Neighbor based signaling of intra prediction modes

ABSTRACT

A device for coding video data is configured to determine that a current block of video data is coded using an intra prediction mode; add an intra prediction mode of a first neighboring block of the current block to a most probable mode candidate list for the current block; add an intra prediction mode for a second neighboring block of the current block to the most probable mode candidate list for the current block; add an intra prediction mode for a third neighboring block of the current block to the most probable mode candidate list for the current block; and code the current block of video data using an intra prediction mode.

This application is a continuation of U.S. application Ser. No.15/590,261, filed 9 May 2017, which claims the benefit of U.S.Provisional Application 62/336,414 filed 13 May 2016 and U.S.Provisional Application 62/404,128 filed 4 Oct. 2016, the entire contenteach of which is incorporated herein by reference.

TECHNICAL FIELD

This disclosure relates to video encoding and video decoding.

BACKGROUND

Digital video capabilities can be incorporated into a wide range ofdevices, including digital televisions, digital direct broadcastsystems, wireless broadcast systems, personal digital assistants (PDAs),laptop or desktop computers, tablet computers, e-book readers, digitalcameras, digital recording devices, digital media players, video gamingdevices, video game consoles, cellular or satellite radio telephones,so-called “smart phones,” video teleconferencing devices, videostreaming devices, and the like. Digital video devices implement videocompression techniques, such as those described in the standards definedby MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, AdvancedVideo Coding (AVC), the High Efficiency Video Coding (HEVC) standardpresently under development, and extensions of such standards. The videodevices may transmit, receive, encode, decode, and/or store digitalvideo information more efficiently by implementing such videocompression techniques.

Video compression techniques perform spatial (intra picture) predictionand/or temporal (inter picture) prediction to reduce or removeredundancy inherent in video sequences. For block-based video coding, avideo slice (i.e., a video frame or a portion of a video frame) may bepartitioned into video blocks, which may also be referred to astreeblocks, coding units (CUs) and/or coding nodes. Video blocks in anintra coded (I) slice of a picture are encoded using spatial predictionwith respect to reference samples in neighboring blocks in the samepicture. Video blocks in an inter coded (P or B) slice of a picture mayuse spatial prediction with respect to reference samples in neighboringblocks in the same picture or temporal prediction with respect toreference samples in other reference pictures. Pictures may be referredto as frames, and reference pictures may be referred to as referenceframes.

Spatial or temporal prediction results in a predictive block for a blockto be coded. Residual data represents pixel differences between theoriginal block to be coded and the predictive block. An inter codedblock is encoded according to a motion vector that points to a block ofreference samples forming the predictive block, and the residual dataindicating the difference between the coded block and the predictiveblock. An intra coded block is encoded according to an intra coding modeand the residual data. For further compression, the residual data may betransformed from the pixel domain to a transform domain, resulting inresidual transform coefficients, which then may be quantized. Thequantized transform coefficients, initially arranged in atwo-dimensional array, may be scanned in order to produce aone-dimensional vector of transform coefficients, and entropy coding maybe applied to achieve even more compression.

SUMMARY

This disclosure describes techniques related to intra prediction and,more particularly, to techniques for signaling, from a video encoder toa video decoder, information used by the video decoder to determine theintra prediction mode that is to be used to decode a particular block ofvideo data.

In one example, a method for decoding video data includes determiningthat a current block of video data is coded using an intra predictionmode; adding an intra prediction mode of a first neighboring block ofthe current block to a most probable mode candidate list for the currentblock; adding an intra prediction mode for a second neighboring block ofthe current block to the most probable mode candidate list for thecurrent block; adding an intra prediction mode for a third neighboringblock of the current block to the most probable mode candidate list forthe current block; determining an intra prediction mode using the mostprobable mode candidate list; and decoding the current block of videodata using the intra prediction mode.

In another example, a device for decoding video data includes a memoryconfigured to store the video data and one or more processors configuredto determine that a current block of the video data is coded using anintra prediction mode; add an intra prediction mode of a firstneighboring block of the current block to a most probable mode candidatelist for the current block; add an intra prediction mode for a secondneighboring block of the current block to the most probable modecandidate list for the current block; add an intra prediction mode for athird neighboring block of the current block to the most probable modecandidate list for the current block; determine an intra prediction modeusing the most probable mode candidate list; and decode the currentblock using the intra prediction mode.

In another example, a method for encoding video data includes,determining that a current block of video data is coded using an intraprediction mode; adding an intra prediction mode of a first neighboringblock of the current block to a most probable mode candidate list forthe current block; adding an intra prediction mode for a secondneighboring block of the current block to the most probable modecandidate list for the current block; adding an intra prediction modefor a third neighboring block of the current block to the most probablemode candidate list for the current block; determine an intra predictionmode using the most probable mode candidate list; and encoding thecurrent block of video data using the intra prediction mode.

In another example, a device for encoding video data includes a memoryconfigured to s tore the video data and one or more processorsconfigured to determine that a current block of video data is codedusing an intra prediction mode; add an intra prediction mode of a firstneighboring block of the current block to a most probable mode candidatelist for the current block; add an intra prediction mode for a secondneighboring block of the current block to the most probable modecandidate list for the current block; add an intra prediction mode for athird neighboring block of the current block to the most probable modecandidate list for the current block; determine an intra prediction modeusing the most probable mode candidate list; and encode the currentblock of video data using the intra prediction mode.

In another example, a computer readable storage medium storinginstructions that when executed by one or more processors cause the oneor more processors to determine that a current block of video data iscoded using an intra prediction mode; add an intra prediction mode of afirst neighboring block of the current block to a most probable modecandidate list for the current block; add an intra prediction mode for asecond neighboring block of the current block to the most probable modecandidate list for the current block; add an intra prediction mode for athird neighboring block of the current block to the most probable modecandidate list for the current block; determine an intra prediction modeusing the most probable mode candidate list; and decode the currentblock using the intra prediction mode.

In another example, a device for decoding video data includes means fordetermining that a current block of video data is coded using an intraprediction mode; means for adding an intra prediction mode of a firstneighboring block of the current block to a most probable mode candidatelist for the current block; means for adding an intra prediction modefor a second neighboring block of the current block to the most probablemode candidate list for the current block; means for adding an intraprediction mode for a third neighboring block of the current block tothe most probable mode candidate list for the current block; means fordetermining an intra prediction mode using the most probable modecandidate list; and means for decoding the current block of video datausing the intra prediction mode.

In another example, a computer readable storage medium storesinstructions that when executed by one or more processors cause the oneor more processors to determine that a current block of video data iscoded using an intra prediction mode; add an intra prediction mode of afirst neighboring block of the current block to a most probable modecandidate list for the current block; add an intra prediction mode for asecond neighboring block of the current block to the most probable modecandidate list for the current block; add an intra prediction mode for athird neighboring block of the current block to the most probable modecandidate list for the current block; determine an intra prediction modeusing the most probable mode candidate list; and encode the currentblock of video data using the intra prediction mode.

In another example, a device for encoding video data includes means fordetermining that a current block of video data is coded using an intraprediction mode; means for adding an intra prediction mode of a firstneighboring block of the current block to a most probable mode candidatelist for the current block; means for adding an intra prediction modefor a second neighboring block of the current block to the most probablemode candidate list for the current block; means for adding an intraprediction mode for a third neighboring block of the current block tothe most probable mode candidate list for the current block; means fordetermining an intra prediction mode using the most probable modecandidate list; and means for encoding the current block of video datausing the intra prediction mode.

The details of one or more examples of the disclosure are set forth inthe accompanying drawings and the description below. Other features,objects, and advantages will be apparent from the description, drawings,and claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system that may utilize the techniques described in thisdisclosure.

FIG. 2 shows an example illustration of the intra prediction modes usedin HEVC.

FIGS. 3A-3E show examples of locations for neighbor blocks of a currentblock.

FIG. 4 shows an example of the MPM modes classification.

FIG. 5 is a block diagram illustrating an example video encoder that mayimplement the techniques described in this disclosure.

FIG. 6 is a block diagram illustrating an example video decoder that mayimplement the techniques described in this disclosure.

FIGS. 7A and 7B are conceptual diagrams illustrating a range updateprocess in binary arithmetic coding.

FIG. 8 is a conceptual diagram illustrating an output process in binaryarithmetic coding.

FIG. 9 is a block diagram illustrating a context adaptive binaryarithmetic coder in a video encoder.

FIG. 10 is a block diagram illustrating a context adaptive binaryarithmetic coder in a video decoder.

FIG. 11 is a flow diagram illustrating techniques for constructing amost probable mode candidate list according to the techniques of thisdisclosure.

FIG. 12 is a flow diagram illustrating techniques for encoding a blockof video data according to the techniques of this disclosure.

FIG. 13 is a flow diagram illustrating techniques for decoding a blockof video data according to the techniques of this disclosure.

DETAILED DESCRIPTION

Various video coding standards, including the recently developed HighEfficiency Video Coding (HEVC) standard include predictive coding modesfor video blocks, where a block currently being coded is predicted basedon an already coded block of video data. In an intra prediction mode,the current block is predicted based on one or more previously coded,neighboring blocks in the same picture as the current block, while in aninter prediction mode the current block is predicted based on an alreadycoded block in a different picture. In inter prediction mode, theprocess of determining a block of a previously coded frame to use as apredictive block is sometimes referred to as motion estimation, which isgenerally performed by a video encoder, and the process of identifyingand retrieving a predictive block is sometimes referred to as motioncompensation, which is performed by both video encoders and videodecoders. Extensions of HEVC and successors to HEVC may also useadditional coding modes, such as intra block copy, dictionary, andpalette coding modes.

This disclosure describes techniques related to intra prediction and,more particularly, to techniques for signaling, from a video encoder toa video decoder, information used by the video decoder to determine theintra prediction mode that is to be used to decode a particular block ofvideo data. This disclosure describes techniques for determining a listof most probable intra prediction modes for a block of video data andtechniques for signaling which of the most probable intra predictionsmode from the list of most probable intra predictions modes was used toencode a block of video data so that the video decoder can use thatintra prediction mode to decode the block of video data. In thisdisclosure, most probable intra predictions modes may also be referredto simply as most probable modes or MPMs. The list of most probableintra prediction modes may also be referred to simply as a most probablemode candidate list or an MPM candidate list.

According to techniques of this disclosure that are described in moredetail below, when a block is coded using an intra prediction mode, avideo encoder may determine an MPM candidate list for the block. A videodecoder may determine the same MPM candidate list as determined by thevideo encoder by implementing the same MPM candidate list constructionprocess implemented by the video encoder. As the video encoder and videodecoder construct the same MPM candidate lists, the video encoder cansignal an intra prediction mode to the video decoder by signaling anindex value that corresponds to a particular candidate in the MPMcandidate list. Unless explicitly stated to the contrary, the MPMcandidate list construction techniques described herein can be performedby either a video encoder or a video decoder.

The MPM candidate list may, for example, include a relatively smallsubset of all available intra prediction modes. As one example, thetotal number of intra prediction modes may be 35 as supported by HEVC orover 60 as is contemplated for successor standards to HEVC, and thenumber of most probable modes included in an MPM candidate list may be 5or 6, or some other number, or may be variable. Modes that are not partof the MPM candidate list may be referred to as non-most probable modes.The techniques of this disclosure are not limited to any particularnumber of intra prediction modes or most probable modes.

Techniques for determining which intra prediction modes are mostprobable modes for any given block are described in more detail below.The intra prediction modes selected as most probable modes for aparticular block generally correspond to intra prediction modes that arestatistically more likely to be used for coding the block. As will beexplained in more detail below, when signaling the actual intraprediction mode for a block of video data, different signalingtechniques may be used if the actual intra prediction modes is one ofthe most probable modes (e.g., an intra prediction mode in the MPMcandidate list) than if the actual intra prediction is one of thenon-most probable modes. The techniques utilized for signaling mostprobable modes may, on average, utilize fewer bits than the signalingtechniques utilized for the non-most probable modes. Therefore, if theactual intra prediction mode is more frequently a most probable modethan a non-most probable mode, then an overall bit savings can beachieved by more frequently using the lower-bit signaling techniqueassociated with most probable modes.

This disclosure describes techniques for determining which most probablemodes to include in an MPM candidate list, and describes techniquesrelated to signaling the actual intra prediction mode for a block ininstances when the actual intra prediction mode is one of the mostprobable modes. This disclosure describes techniques related to intraprediction mode signaling, and more particularly, this disclosuredescribes techniques for using intra prediction modes of already codedneighbor blocks as a predictor of most probable modes. Additionally,this disclosure describes techniques for signaling most probablemode-related information using entropy coding with contexts.

This disclosure may at times refer to a video coder. Video coder isintended to be a generic term that refers to either video encoding orvideo decoding. Likewise, the term video coding is intended to be ageneric term that refers to either video encoding or video decoding.Certain techniques may be described with respect to either videoencoding or video decoding, but unless explicitly stated otherwise, itshould not be assumed that those techniques are not equally applicableto the other of video encoding or video decoding. Thus, even if certaintechniques of this disclosure are described with respect to one of avideo encoder or video decoder, the techniques should generally beassumed to also be applicable to the other of the video encoder or videodecoder.

This disclosure, for example, describes techniques for generating an MPMcandidate list and for determining contexts for entropy coding certaininformation. The techniques for generating the MPM candidate list anddetermining the contexts performed by a video encoder may be the same asperformed by a video decoder, such that the video decoder can determinethe same MPM candidate list or the same context as the encoder withlittle or no explicit signaling from the video encoder to the videodecoder.

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system 10 that may utilize the techniques described in thisdisclosure, including techniques for encoding and decoding blocks in anintra prediction mode. As shown in FIG. 1, system 10 includes a sourcedevice 12 that generates encoded video data to be decoded at a latertime by a destination device 14. Source device 12 and destination device14 may comprise any of a wide range of devices, including desktopcomputers, notebook (i.e., laptop) computers, tablet computers, set-topboxes, telephone handsets such as so-called “smart” phones, so-called“smart” pads, televisions, cameras, display devices, digital mediaplayers, video gaming consoles, video streaming device, or the like. Insome cases, source device 12 and destination device 14 may be equippedfor wireless communication.

Destination device 14 may receive the encoded video data to be decodedvia a link 16. Link 16 may comprise any type of medium or device capableof moving the encoded video data from source device 12 to destinationdevice 14. In one example, link 16 may comprise a communication mediumto enable source device 12 to transmit encoded video data directly todestination device 14 in real-time. The encoded video data may bemodulated according to a communication standard, such as a wirelesscommunication protocol, and transmitted to destination device 14. Thecommunication medium may comprise any wireless or wired communicationmedium, such as a radio frequency (RF) spectrum or one or more physicaltransmission lines. The communication medium may form part of apacket-based network, such as a local area network, a wide-area network,or a global network such as the Internet. The communication medium mayinclude routers, switches, base stations, or any other equipment thatmay be useful to facilitate communication from source device 12 todestination device 14.

Alternatively, encoded data may be output from output interface 22 to astorage device 17. Similarly, encoded data may be accessed from storagedevice 17 by input interface. Storage device 17 may include any of avariety of distributed or locally accessed data storage media such as ahard drive, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile ornon-volatile memory, or any other suitable digital storage media forstoring encoded video data. In a further example, storage device 17 maycorrespond to a file server or another intermediate storage device thatmay hold the encoded video generated by source device 12. Destinationdevice 14 may access stored video data from storage device 17 viastreaming or download. The file server may be any type of server capableof storing encoded video data and transmitting that encoded video datato the destination device 14. Example file servers include a web server(e.g., for a website), an FTP server, network attached storage (NAS)devices, or a local disk drive. Destination device 14 may access theencoded video data through any standard data connection, including anInternet connection. This may include a wireless channel (e.g., a Wi-Ficonnection), a wired connection (e.g., DSL, cable modem, etc.), or acombination of both that is suitable for accessing encoded video datastored on a file server. The transmission of encoded video data fromstorage device 17 may be a streaming transmission, a downloadtransmission, or a combination of both.

The techniques of this disclosure are not necessarily limited towireless applications or settings. The techniques may be applied tovideo coding in support of any of a variety of multimedia applications,such as over-the-air television broadcasts, cable televisiontransmissions, satellite television transmissions, streaming videotransmissions, e.g., via the Internet, encoding of digital video forstorage on a data storage medium, decoding of digital video stored on adata storage medium, or other applications. In some examples, system 10may be configured to support one-way or two-way video transmission tosupport applications such as video streaming, video playback, videobroadcasting, and/or video telephony.

In the example of FIG. 1, source device 12 includes a video source 18,video encoder 20 and an output interface 22. In some cases, outputinterface 22 may include a modulator/demodulator (modem) and/or atransmitter. In source device 12, video source 18 may include a sourcesuch as a video capture device, e.g., a video camera, a video archivecontaining previously captured video, a video feed interface to receivevideo from a video content provider, and/or a computer graphics systemfor generating computer graphics data as the source video, or acombination of such sources. As one example, if video source 18 is avideo camera, source device 12 and destination device 14 may formso-called camera phones or video phones. However, the techniquesdescribed in this disclosure may be applicable to video coding ingeneral, and may be applied to wireless and/or wired applications.

The captured, pre-captured, or computer-generated video may be encodedby video encoder 20. The encoded video data may be transmitted directlyto destination device 14 via output interface 22 of source device 12.The encoded video data may also (or alternatively) be stored ontostorage device 17 for later access by destination device 14 or otherdevices, for decoding and/or playback.

Destination device 14 includes an input interface 28, a video decoder30, and a display device 34. In some cases, input interface 28 mayinclude a receiver and/or a modem. Input interface 28 of destinationdevice 14 receives the encoded video data over link 16. The encodedvideo data communicated over link 16, or provided on storage device 17,may include a variety of syntax elements generated by video encoder 20for use by a video decoder, such as video decoder 30, in decoding thevideo data. Such syntax elements may be included with the encoded videodata transmitted on a communication medium, stored on a storage medium,or stored a file server.

Display device 34 may be integrated with, or external to, destinationdevice 14. In some examples, destination device 14 may include anintegrated display device and also be configured to interface with anexternal display device. In other examples, destination device 14 may bea display device. In general, display device 34 displays the decodedvideo data to a user, and may comprise any of a variety of displaydevices such as a liquid crystal display (LCD), a plasma display, anorganic light emitting diode (OLED) display, or another type of displaydevice.

Video encoder 20 and video decoder 30 may operate according to a videocompression standard, such as HEVC, and may conform to the HEVC TestModel (HM). A working draft of the HEVC standard, referred to as “HEVCWorking Draft 10” or “HEVC WD10,” is described in Bross et al.,“Editors' proposed corrections to HEVC version 1,” Joint CollaborativeTeam on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IECJTC1/SC29/WG11, 13^(th) Meeting, Incheon, KR, April 2013. Another HEVCdraft specification is available fromhttp://phenix.int-evry.fr/jct/doc_end_user/documents/15_Geneva/wg11/JCTVC-O1003-v2.zip.The techniques described in this disclosure may also operate accordingto extensions of the HEVC standard that are currently in development.

Alternatively or additionally, video encoder 20 and video decoder 30 mayoperate according to other proprietary or industry standards, such asthe ITU-T H.264 standard, alternatively referred to as MPEG-4, Part 10,Advanced Video Coding (AVC), or extensions of such standards. Thetechniques of this disclosure, however, are not limited to anyparticular coding standard. Other examples of video compressionstandards include ITU-T H.261, ISO/IEC MPEG-1 Visual, ITU-T H.262 orISO/IEC MPEG-2 Visual, ITU-T H.263, ISO/IEC MPEG-4 Visual and ITU-TH.264 (also known as ISO/IEC MPEG-4 AVC), including its Scalable VideoCoding (SVC) and Multiview Video Coding (MVC) extensions. Video codingstandards also include proprietary video codecs, such Google VP8, VP9,VP10, and video codecs developed by other organizations, for example,the Alliance for Open Media.

The design of the HEVC has been finalized by the JCT-VC of ITU-T VideoCoding Experts Group (VCEG) and ISO/IEC Motion Picture Experts Group(MPEG). The Range Extensions to HEVC, referred to as HEVC RExt, are alsobeing developed by the JCT-VC. A recent Working Draft (WD) of Rangeextensions, referred to as RExt WD7 hereinafter, is available fromhttp://phenix.int-evry.fr/jct/doc_enduser/documents/17_Valencia/wg11/JCTVC-Q1005-v4.zip.

This disclosure will generally refer to the recently finalized HEVCspecification text as HEVC version 1 or base HEVC. The range extensionspecification may become the version 2 of the HEVC. With respect to manycoding tools, such as motion vector prediction, HEVC version 1 and therange extension specification are technically similar. Therefore,whenever this disclosure describes changes relative to HEVC version 1,the same changes may also apply to the range extension specification,which generally includes the base HEVC specification, plus someadditional coding tools. Furthermore, it can generally be assumed thatHEVC version 1 modules may also be incorporated into a decoderimplementing the HEVC range extension.

New video coding standards, such as the JVET test model, are presentlyunder development as successors to HEVC. This disclosure will describecertain video techniques using HEVC terminology for ease of explanation.It should be understood, however, that such techniques are not limitedto HEVC and may be applicable to video coding standards other than HEVC.

It is generally contemplated that video encoder 20 of source device 12may be configured to encode video data according to any of these currentor future standards. Similarly, it is also generally contemplated thatvideo decoder 30 of destination device 14 may be configured to decodevideo data according to any of these current or future standards.

Although not shown in FIG. 1, in some aspects, video encoder 20 andvideo decoder 30 may each be integrated with an audio encoder anddecoder, and may include appropriate MUX-DEMUX units, or other hardwareand software, to handle encoding of both audio and video in a commondata stream or separate data streams. If applicable, in some examples,MUX-DEMUX units may conform to the ITU H.223 multiplexer protocol, orother protocols such as the user datagram protocol (UDP).

Video encoder 20 and video decoder 30 each may be implemented as any ofa variety of suitable encoder circuitry, such as one or moremicroprocessors, digital signal processors (DSPs), application specificintegrated circuits (ASICs), field programmable gate arrays (FPGAs),discrete logic, software, hardware, firmware or any combinationsthereof. When the techniques are implemented partially in software, adevice may store instructions for the software in a suitable,non-transitory computer-readable medium and execute the instructions inhardware using one or more processors to perform the techniques of thisdisclosure. Each of video encoder 20 and video decoder 30 may beincluded in one or more encoders or decoders, either of which may beintegrated as part of a combined encoder/decoder (CODEC) in a respectivedevice.

As introduced above, the JCT-VC has recently finalized development ofthe HEVC standard. The HEVC standardization efforts were based on anevolving model of a video coding device referred to as the HEVC TestModel (HM). The HM presumes several additional capabilities of videocoding devices relative to existing devices according to, e.g., ITU-TH.264/AVC. For example, whereas H.264 provides nine intra-predictionencoding modes, the HM may provide as many as thirty-fiveintra-prediction encoding modes.

In HEVC and other video coding specifications, a video sequencetypically includes a series of pictures. Pictures may also be referredto as “frames.” A picture may include three sample arrays, denotedS_(L), S_(Cb), and S_(Cr). S_(L) is a two-dimensional array (i.e., ablock) of luma samples. S_(Cb) is a two-dimensional array of Cbchrominance samples. S_(Cr) is a two-dimensional array of Cr chrominancesamples. Chrominance samples may also be referred to herein as “chroma”samples. In other instances, a picture may be monochrome and may onlyinclude an array of luma samples.

To generate an encoded representation of a picture, video encoder 20 maygenerate a set of coding tree units (CTUs). Each of the CTUs maycomprise a coding tree block of luma samples, two corresponding codingtree blocks of chroma samples, and syntax structures used to code thesamples of the coding tree blocks. In monochrome pictures or pictureshaving three separate color planes, a CTU may comprise a single codingtree block and syntax structures used to code the samples of the codingtree block. A coding tree block may be an N×N block of samples. A CTUmay also be referred to as a “tree block” or a “largest coding unit”(LCU). The CTUs of HEVC may be broadly analogous to the macroblocks ofother standards, such as H.264/AVC. However, a CTU is not necessarilylimited to a particular size and may include one or more coding units(CUs). A slice may include an integer number of CTUs orderedconsecutively in a raster scan order.

To generate a coded CTU, video encoder 20 may recursively performquad-tree partitioning on the coding tree blocks of a CTU to divide thecoding tree blocks into coding blocks, hence the name “coding treeunits.” A coding block may be an N×N block of samples. A CU may comprisea coding block of luma samples and two corresponding coding blocks ofchroma samples of a picture that has a luma sample array, a Cb samplearray, and a Cr sample array, and syntax structures used to code thesamples of the coding blocks. In monochrome pictures or pictures havingthree separate color planes, a CU may comprise a single coding block andsyntax structures used to code the samples of the coding block.

Video encoder 20 may partition a coding block of a CU into one or moreprediction blocks. A prediction block is a rectangular (i.e., square ornon-square) block of samples on which the same prediction is applied. Aprediction unit (PU) of a CU may comprise a prediction block of lumasamples, two corresponding prediction blocks of chroma samples, andsyntax structures used to predict the prediction blocks. In monochromepictures or pictures having three separate color planes, a PU maycomprise a single prediction block and syntax structures used to predictthe prediction block. Video encoder 20 may generate predictive luma, Cb,and Cr blocks for luma, Cb, and Cr prediction blocks of each PU of theCU.

Video encoder 20 may use intra prediction or inter prediction togenerate the predictive blocks for a PU. If video encoder 20 uses intraprediction to generate the predictive blocks of a PU, video encoder 20may generate the predictive blocks of the PU based on decoded samples ofthe picture associated with the PU. If video encoder 20 uses interprediction to generate the predictive blocks of a PU, video encoder 20may generate the predictive blocks of the PU based on decoded samples ofone or more pictures other than the picture associated with the PU.

After video encoder 20 generates predictive luma, Cb, and Cr blocks forone or more PUs of a CU, video encoder 20 may generate a luma residualblock for the CU. Each sample in the CU's luma residual block indicatesa difference between a luma sample in one of the CU's predictive lumablocks and a corresponding sample in the CU's original luma codingblock. In addition, video encoder 20 may generate a Cb residual blockfor the CU. Each sample in the CU's Cb residual block may indicate adifference between a Cb sample in one of the CU's predictive Cb blocksand a corresponding sample in the CU's original Cb coding block. Videoencoder 20 may also generate a Cr residual block for the CU. Each samplein the CU's Cr residual block may indicate a difference between a Crsample in one of the CU's predictive Cr blocks and a correspondingsample in the CU's original Cr coding block.

Furthermore, video encoder 20 may use quad-tree partitioning todecompose the luma, Cb, and Cr residual blocks of a CU into one or moreluma, Cb, and Cr transform blocks. A transform block is a rectangular(e.g., square or non-square) block of samples on which the sametransform is applied. A transform unit (TU) of a CU may comprise atransform block of luma samples, two corresponding transform blocks ofchroma samples, and syntax structures used to transform the transformblock samples. Thus, each TU of a CU may be associated with a lumatransform block, a Cb transform block, and a Cr transform block. Theluma transform block associated with the TU may be a sub-block of theCU's luma residual block. The Cb transform block may be a sub-block ofthe CU's Cb residual block. The Cr transform block may be a sub-block ofthe CU's Cr residual block. In monochrome pictures or pictures havingthree separate color planes, a TU may comprise a single transform blockand syntax structures used to transform the samples of the transformblock.

Video encoder 20 may apply one or more transforms to a luma transformblock of a TU to generate a luma coefficient block for the TU. Acoefficient block may be a two-dimensional array of transformcoefficients. A transform coefficient may be a scalar quantity. Videoencoder 20 may apply one or more transforms to a Cb transform block of aTU to generate a Cb coefficient block for the TU. Video encoder 20 mayapply one or more transforms to a Cr transform block of a TU to generatea Cr coefficient block for the TU.

After generating a coefficient block (e.g., a luma coefficient block, aCb coefficient block or a Cr coefficient block), video encoder 20 mayquantize the coefficient block. Quantization generally refers to aprocess in which transform coefficients are quantized to possibly reducethe amount of data used to represent the transform coefficients,providing further compression. After video encoder 20 quantizes acoefficient block, video encoder 20 may entropy encode syntax elementsindicating the quantized transform coefficients. For example, videoencoder 20 may perform Context-Adaptive Binary Arithmetic Coding (CABAC)on the syntax elements indicating the quantized transform coefficients.

Video encoder 20 may output a bitstream that includes a sequence of bitsthat forms a representation of coded pictures and associated data. Thebitstream may comprise a sequence of NAL units. A NAL unit is a syntaxstructure containing an indication of the type of data in the NAL unitand bytes containing that data in the form of a RB SP interspersed asnecessary with emulation prevention bits. Each of the NAL units includesa NAL unit header and encapsulates a RBSP. The NAL unit header mayinclude a syntax element that indicates a NAL unit type code. The NALunit type code specified by the NAL unit header of a NAL unit indicatesthe type of the NAL unit. A RBSP may be a syntax structure containing aninteger number of bytes that is encapsulated within a NAL unit. In someinstances, an RBSP includes zero bits.

Different types of NAL units may encapsulate different types of RBSPs.For example, a first type of NAL unit may encapsulate an RBSP for a PPS,a second type of NAL unit may encapsulate an RBSP for a coded slice, athird type of NAL unit may encapsulate an RBSP for SEI messages, and soon. NAL units that encapsulate RBSPs for video coding data (as opposedto RBSPs for parameter sets and SEI messages) may be referred to as VCLNAL units.

Video decoder 30 may receive a bitstream generated by video encoder 20.In addition, video decoder 30 may parse the bitstream to obtain syntaxelements from the bitstream. Video decoder 30 may reconstruct thepictures of the video data based at least in part on the syntax elementsobtained from the bitstream. The process to reconstruct the video datamay be generally reciprocal to the process performed by video encoder20. In addition, video decoder 30 may inverse quantize coefficientblocks associated with TUs of a current CU. Video decoder 30 may performinverse transforms on the coefficient blocks to reconstruct transformblocks associated with the TUs of the current CU. Video decoder 30 mayreconstruct the coding blocks of the current CU by adding the samples ofthe predictive blocks for PUs of the current CU to corresponding samplesof the transform blocks of the TUs of the current CU. By reconstructingthe coding blocks for each CU of a picture, video decoder 30 mayreconstruct the picture.

To increase the variety of intra prediction modes included in an MPMcandidate list, this disclosure describes techniques for including intraprediction modes from neighbor blocks in the MPM candidate list as wellas techniques for including default and derived candidates in the MPMcandidate list. The techniques of this disclosure may improve the codingefficiency associated with signaling intra prediction modes byincreasing the probability that the actual intra prediction mode used toencode a block of video data will be a most probable mode. As signalinga most probable mode typically requires fewer bits than signaling anon-most probable mode, having the actual intra prediction mode used toencode a block of video data be a most probable mode more frequently mayreduce the signaling overhead associated with signaling intra predictionmodes.

The techniques described in this disclosure can be used to generate anMPM candidate list of any size (generically referred to herein as sizeN). In some examples, N may be equal to 6 as currently contemplated inthe JVET, but other larger or smaller values for N may also be used. Thetechniques of this disclosure are not limited to any particular value ofN.

FIG. 2 shows an example of the intra prediction modes used in HEVC. The35 intra prediction modes of HEVC include 33 directional modes (shownwith mode indexes 2 to 34 in FIG. 2) plus two non-directional modesreferred to as DC mode (mode index 1 in FIG. 2) and planar mode (modeindex 0 in FIG. 2). The techniques of this disclosure may be applied forany number of directional modes used for intra prediction. For example,the number of modes may be 35 as used in HEVC, or may be 63, 66, or someother number of modes greater than 35, as is being contemplated forsuccessor standards to HEVC. The described techniques may be applied forintra prediction mode coding of only a selected color components, suchas only a luma component or only a chroma component, or may be appliedfor all available color components (luma and both chroma), or in anyother combination.

According to the techniques of this disclosure, a video coder, such asvideo encoder 20 or video decoder 30, may check three or moreneighboring blocks of a group of neighboring blocks to identify intraprediction modes to add to an MPM candidate list for a current block. Ifa neighboring block is coded using an intra prediction mode, then thevideo coder may add the intra prediction mode used to code theneighboring block to the MPM candidate list for the current block. Thelocations of the neighbor blocks checked by the video coder may be fixedrelative to the current block. For example, the locations of theneighbor blocks may be a left (L) block, an above (A) block, a belowleft (BL) block, an above right (AR) block, and/or an above left (AL)block. Other neighboring blocks may also be used. The order in whichintra prediction modes from the neighbor blocks are added to the MPMcandidate list may be fixed or may vary, for example the order candepend on the current block size, whether the block is of a certainshape, such as rectangular or square, or based on context information.

Five neighbor locations are provided as an example, but fewer or moreneighbor blocks can be considered in the construction of the MPMcandidate list using the described techniques. One example with morethan five locations is shown in FIG. 3E.

The location for a neighboring block may be represented by a sub-blocksize, for example 4×4, meaning that it is the granularity at which intraprediction mode information is stored. In another example, intraprediction mode information can be specified per pixel or for largerblocks, such as 8×8. If chroma is subsampled comparing to lumacomponent, such as in 4:2:0 color format, then the chroma componentsub-block location may be smaller, for example 2×2, which may correspondto luma 4×4.

In some examples, depending on the neighbor block size, the locationsmay belong to the same block. For example, if a neighbor block is 16×16and the currently coded block is 8×8, then the above left and leftlocations may correspond to the same 16×16 neighbor block, where theintra prediction mode information would be the same in those locations.

The number of neighbor locations M can be equal to the MPM candidatelist size N, but may be smaller or larger. In one example, the number Mmay always be smaller than N to allocate some room to include othertypes of intra prediction modes into MPM candidate list. The number oflocations can depend on the current and/or neighbor block'scharacteristics, such as block size, whether a block is square orrectangular, whether the rectangular block is a horizontal block (i.e,width is greater than height), the ratio between height and width, theratio between the larger and smaller value of height and width, orwhether the block is a vertical block (width is smaller than height)oriented. The number of locations may also depend on the neighborblock's prediction mode (e.g., intra or inter).

In another example, the neighbor block locations and intra predictionmodes order, in which the intra prediction modes are added into the MPMcandidate list, can be different. For example, the order may bedifferent for certain blocks and can depend, for example, on the currentblock size, whether the current block is square or rectangular, whetherthe current block is vertically oriented (width is smaller than height),or horizontally oriented (width is larger than height).

In yet another example, the locations and intra prediction modes ordercan depend on the neighbor blocks characteristics. The characteristics,for example, can be neighbor blocks prediction mode (intra or inter), ofneighbor block size, whether neighbor block is square or rectangular,whether neighbor block is vertically oriented (width is smaller thanheight), the ratio between height and width, the ratio between thelarger and smaller value of height and width, or horizontally oriented(width is larger than height).

In another example, the locations of the neighbor blocks relative to thecurrent block can be the same as in merge or advanced motion vectorprediction (AMVP) inter prediction modes. This unification can have animplementation benefit, as the same function can be reused for inter andintra prediction modes.

In general, a video coder can generate an MPM candidate list fromdifferent MPM types. The different types may include, but are notlimited to, neighbor-based intra prediction modes, derived intraprediction modes, and default intra prediction modes. A neighbor-basedintra prediction mode indicates an intra prediction mode that is usedfor a neighboring block. A default intra prediction mode refers to aconstant intra prediction mode that does not change with the neighboringblocks. The default intra prediction mode(s) may, for example, be planarmode, DC mode, horizontal mode, or vertical mode. A derived intraprediction mode refers to an intra prediction mode that is derived basedon a neighbor-based intra prediction mode or a default intra predictionmode. For example, a derived intra prediction mode may be aneighbor-based intra prediction mode ±1, ±2, etc. A derived intraprediction mode can be also generated by another existing derived intraprediction mode. A derived intra prediction mode may not be the actualintra prediction mode of a neighboring block, but rather, may be anintra prediction mode that is derived from the actual intra predictionmode of a neighboring block or derived in some other manner.

The video coder may add intra prediction modes to the MPM candidate listaccording to the intra prediction mode type. As one example, the videocoder may first add neighbor-based intra prediction modes, then addderived modes, and then add the default modes. In another example, thevideo coder may add intra prediction modes with different types in aninterleaved manner. For example, the video coder may add one or moredefault modes after adding a certain number of neighbor-based intraprediction modes to the list. For example, the video coder may add twoneighbor-based modes, then two default modes, then add moreneighbor-based intra prediction modes.

FIGS. 3A-3E show examples of locations for the neighbor blocks, someexamples are shown, blocks can be rectangular or squares. FIG. 3C showsan example unified with the merge/AMVP modes. FIG. 3D shows an examplewith greater number of the neighbor locations. Some center locations onthe left or above, not showed on the figure, can be also used.

Aspects of MPM candidate list construction and derived modes will now bedescribed. When neighbor-based intra prediction modes are considered tobe included into the MPM candidate list, only unique intra predictionmodes can be added to the list. For example, if one neighbor block hasthe same intra prediction mode, which is already added to the MPMcandidate list, then such mode is not added to the list a second time.

The video coder may only add a certain number (K) of neighbor-basedintra prediction modes to the MPM candidate list of size N. For example,M neighbor locations may be considered, but only K, which can be smallerthan M, number of neighbor-based intra prediction modes may be added tothe MPM candidate list. For example, a video coder may addneighbor-based intra prediction modes from certain locations in acertain order, and once the number of added neighbor modes has reached Kmodes, the video coder may stop adding neighbor-based intra predictionmodes into the MPM candidate list. In some example, K may represent anumber of unique modes and not necessarily a number of considered modes.In other words, if duplicate modes are considered (e.g., two neighboringblocks have the same intra prediction mode), the video coder may onlyadd one instance of the mode to the MPM candidate list. Only adding Kneighbor-based intra prediction modes to the MPM candidate list mayreserve space in the MPM candidate list for other types of modes, suchas derived intra prediction modes and/or default intra prediction modes,described in more detail below.

After the video coder adds intra prediction modes from the neighborblocks to the MPM candidate list, the MPM candidate list may still notbe complete (number of modes is less than N) because, for example somemodes are the same and are not added to the list. However, it can berequired that the MPM candidate list has to be always complete, e.g. hasthe size of N.

In this case, intra prediction modes need to be added to the list. Thoseadditional modes can be classified into two types: intra predictionmodes derived from the intra prediction modes already added to the MPMcandidate list and default intra prediction modes.

Derived intra prediction modes are the modes derived from the intraprediction modes already added to the MPM candidate list. For example,the derived intra prediction mode can be a mode obtained by addingcertain offset to a mode from the MPM candidate list. The offset can be−+1, −+2, and so on. The offset value can depend on the current orneighbor block characteristics as explained above.

When more than one offset values are intended to be used to derive intraprediction modes, the offsets can be applied in the certain order. Theorder can depend, for example, on the block characteristics. Forexample, in the beginning, the first offset is applied to all intraprediction modes already added to the MPM candidate list, then thesecond offset value is applied to already added modes into MPM candidatelist, and so on.

In another example, all offset values are applied to the first intraprediction mode from the MPM candidate list, then all offset values areapplied to the second intra prediction mode from the MPM candidate list,and so on.

In yet another example, in the above example, the offset value can bereplaced with an offset set. For example, the offset set can be composedfrom the offset value of the same magnitude. For example, −+1 may be oneoffset set, −+2 may be the second offset set, and so on. In anotherexample, offset set may be composed from the offset values having thesame sign. For example, +1, +2, . . . may be one set, while −1, −2, . .. is a second set. The above two examples can be combined. In anotherexample, an offset set may be composed as a subset from all possibleoffset values, where subset, for example, can be dependent on the intraprediction mode to which the offset is going to be applied. For example,one intra prediction mode may have a certain subset of the offsetvalues, and another intra prediction mode may have another subset of theoffset values, which may be difference form the first sub-set.

Offset value may not be applied for certain intra prediction modes, forexample offset is not applied to non-angular modes such as DC, PLANAR,or LM modes, offset may not be applied to the derived or default intraprediction modes.

Another method of creating derived modes can be a rotation. For example,rotated derived modes may be created from the neighbor-based intraprediction modes by rotating the mode by certain angle. The angle canbe, for example, 45, 90, or 180 degree or any other value. For example,if the rotation angle is equal to 90 degrees and neighbor mode ishorizontal intra prediction mode, then the derived mode may be verticalmode. As another example, if the neighbor mode is horizontal modes, thenthe derived mode is the vertical mode. The same technique can be appliedto other directional modes or rotation angles.

The rotation can be applied only to the certain neighbor modes, forexample, rotation may not be applied to non-angular modes. In anotherexample, rotation usage can depend on the current or neighbor blockscharacteristics described above. For example, rotation can be appliedonly to the modes if the current or neighbor blocks have rectangularshape.

In some implementations, only unique derived modes can be added to thelist. Therefore, if an intra prediction mode that is equal to thederived intra prediction mode is already added to the MPM candidatelist, the derived mode may not be added to the MPM candidate list. Insome implementations, only a certain number of the derived modes may beadded to MPM candidate list. The number may be fixed. In anotherexample, the number of derived modes added to the list may be equal tothe MPM candidate list size N minus number of modes form the neighborblocks M. In general, derived modes can be kept adding until the MPMcandidate list is not complete.

In some coding scenarios, intra prediction modes from the neighborblocks and derived modes may not be enough to complete the MPM candidatelist. In one example, there may be a coding scenario where there are nointra prediction modes available from the neighbor blocks because, forexample, the current block is at a picture boundary or all neighborblocks are inter coded. In such a case, derived modes may not beavailable either.

To complete the MPM candidate list, default intra prediction modes canbe added to the list. The number of the default intra prediction modesmay have to be equal to the desired MPM candidate list size, since theentire MPM candidate list may be composed from the default modes.However, in examples where there are already some modes identified inthe MPM candidate list, inclusion of default intra prediction modes mayensure that the MPM candidate list is full.

The default modes, can be basically the subset of the possible intraprediction modes, and those modes can be unique. The intra predictionmodes selected for the default modes can be fixed, or be dependent onthe current or neighbor block characteristics.

In another example, certain modes can always be added as the defaultmodes. Such modes can be, for example, PLANAR, DC, vertical mode,horizontal mode, diagonal modes, for example, left (from top left cornertoward bottom right corner of the block) or right (from top right cornertowards bottom left corner of the block) diagonal modes. The defaultmodes and the order in which the default modes are added to MPMcandidate list can be fixed or can be dependent on characteristics ofthe current block and/or on characteristics of the neighbor blocks.

In one example, the default mode list can be PLANAR, DC, vertical,horizontal, left diagonal, right diagonal. In another example, thedefault mode list may be PLANAR, DC, vertical, horizontal, verticalminus 1, horizontal minus 1. For chroma component, the default mode canbe DM or LM modes. In addition, one or more derived default modes can bemaintained and updated during encoding and decoding, the default modescan be most frequently used modes in the previously coded blocks. Thederived default modes can be applied in a way that one or more defaultmodes are replaced by the derived default modes when generating the MPMcandidate list.

In another example, the full default mode list can be derived from thesmaller mode list by applying offset or rotation technique describedabove for obtaining the derived modes. Also, it can be a requirementthat the default mode list shall include only unique intra predictionmodes.

In another example, some default modes can be added into the list priorto the certain neighbor locations or after the certain number ofneighbor-based intra prediction modes already included to the MPMcandidate list, for example after two neighbor-based intra predictionmodes some default intra prediction modes are added.

In one example, left and above intra prediction modes, which may beunique, equal, or not available, are added to the MPM candidate list,and then non-angular default modes, such as PLANR or DC, are added tothe MPM candidate list. After the defaults modes are added to the MPMcandidate list, more neighbor-based intra prediction modes according theneighbor blocks order are added to the MPM candidate list. Again, insome implementations, only unique modes are added to the list. Theinterleaving manner of adding modes can depend on the current andneighbor blocks characteristics.

Aspect of context modeling for the MPM modes will now be described. Aswill be explained in greater detail below with respect to FIGS. 9 and10, the context model used for entropy coding may affect the datacompression achieved by the entropy coding process. Therefore, contextmodeling may affect the overall compression achieved by a video encoder.This disclosure describes techniques for choosing a context model foruse in signaling intra prediction modes that may improve overall videocompression.

If the current intra prediction mode to be coded is equal to one of theMPM modes, then the video coder may signal the current intra predictionusing context coded bins corresponding to the MPM modes. For example,the bins to be signaled can be defined by the binarization, and thebinarization can be any codeword derivation scheme, such as unary,truncated unary, fixed binary, Golomb, Exponential Golomb, Rice and anyother binarizations without limitation. The binarization can be appliedto the MPM index, e.g. the MPM mode from the MPM candidate list at acertain position, to which the current intra prediction mode is equalto. This index can be signaled in bitstream. Each bin or a certainnumber of bins in the binarized representation can be context coded, thecontext can be derived according to the classification of the MPM modes.

For example, in the unary or truncated unary binarization or similarbinarization, each bin corresponds to every mode from the MPM candidatelist, for example 0 represents that the current mode is not equal to themode from the MPM candidate list, and 1 represents that the current modeis equal to that MPM mode. Then, each bin or certain number of firstbins can be context coded, and context is dependent on the correspondedMPM mode classification.

As one example, the MPM candidate list may be composed from {HOR, VER,PLANAR, DC, DIAG_LEFT, DIAG_RIGHT} modes. And let the current intraprediction mode to be coded is equal to PLANAR mode, e.g. the MPM indexis 2 to be signaled. If binarization is truncated unary, then thebinarization codeword is 001 corresponding to the index 2, the max valueis equal to 5.

001: 0 (corresponds to MPM0) 0 (corresponds to MPM1) 1 (corresponds toMPM2). MPM0=HOR, MPM1=VER, MPM2=PLANAR, . . . .

As can be seen, each bin corresponds to a certain MPM mode from thelist, and context for that bins are derived according to the MPMiclassification, i=0 . . . 2 in this example. In this example, the MPM0related context may be used for a horizontal set of modes, the MPM1related context may be used for a vertical set of modes, and MPM2related context may be used for a non-angular set of modes.

The classification of the MPM modes can be, for example, based whetherintra prediction mode is angular or non-angular mode, or according tothe angular direction, such as vertical or horizontal set.

In another example, all intra prediction modes can be classified intothe three sets: non-angular, horizontal or vertical sets. Vertical setcan be for example, the intra prediction modes closed to the verticaldirection, for example modes with the −+45 degree angle from thevertical direction, horizontal set is similarly derived as the modeswith −+45 degree angle from the horizontal direction.

FIG. 4 shows an example of the MPM modes classification (one set is thehorizontal set, one set is the vertical set, and one set is non angularset. Diagonal mode(s) (such as mode 18, including modes 2, 34, andsimilar modes in another example) may be classified into horizontal orvertical sets or can be included into a separated diagonal set).

In another example, all angular directions can be divided into more thanhorizontal or vertical sets. For example, the angular modes may beuniformly divided into some number of sets. Each intra prediction modemay be classified into one of the sets, for example as being in acertain angle range. In another example, each set may include only oneintra prediction mode, and the selection may be intra-mode specific.

Aspects of context modelling using intra prediction mode classificationand generalization to most probable mode vectors (MPMV) will now bedescribed. Intra prediction mode classification described above may beapplied to the block's intra prediction mode and may be used to signaladditional intra related syntax elements. It can be used for any methodor syntax element that is applied or signaled after the intra predictionmode is coded, i.e., when intra prediction mode is already known at thedecoder.

For example, PDPC and/or NSST indices, which respectively define thetype of prediction and transform to be used for intra-prediction in ablock, can be signaled using context modeling based on intra predictionmode classification. For every set in the classification, a separatecontext may be used.

Entropy coding can exploit statistical dependences between elements tobe coded using the context-based techniques described above. Anothermethod is based on combining the data and coding it together. Forexample, instead of using a list of only prediction modes (MPM), vectorsof related intra-prediction information can be created, called as mostprobable mode vectors (MPMV). For example, the elements in a MPMV cancontain the following information and indexes

[Prediction Mode, PDPC Choice, NSST Choice]

The techniques described in the previous sections, for processing andcoding MPMs can be extended for MPMVs, and for example, a single binarysymbol can indicate if all the elements in a vector are equal to oneentry in the MPMV list. Or, one binary symbol may indicate whether atleast two of the elements are equal, and so on.

These extensions correspond to alternative binarizations of the vectorinformation but are more general than those that are constrained to onlycode one type of information after another is completely coded, becauseit allows coding simultaneously partial information about all elements.

In the current JEM, the contexts for MPM index coding are separated into3 groups, i.e. Planar and DC (non-angular set), a horizontal set (modesfrom the bottom-left-to-above-right diagonal direction to the diagonalmode inclusive), and a vertical set (from the diagonal mode toabove-right-to-bottom-left diagonal direction). The context set may berefined based on the intra MPM mode direction and/or the current blockshape, and/or number of MPM modes in the MPM candidate list.

For example, if the total number of intra prediction modes is higherthan the 35 modes used in HEVC, for example 67 modes, then a context fora MPM index can be grouped in a way that the context model depends onthe distance to the preferred intra prediction modes, for examplevertical or horizontal directions, for example as shown in the nexttable.

Intra 0, 1 2 to 5  6 to 12 13 to 21 22 to 28 29 to 34 prediction modeContext 0 1 2 3 2 1 model index Intra 35 to 38 39 to 45 46 to 54 55 to61 62 to 67 prediction mode Context 1 2 3 2 1 model index

More generally, a context used to code an MPM index may be assignedaccording to the distance of the particular MPM mode (the mode withparticular MPM index) from the default or preselected intra predictionmodes, in other words how far is the current MPM mode from the defaultmodes. Those default modes can be, for example, horizontal, vertical,diagonal or any other direction.

FIG. 5 is a block diagram illustrating an example video encoder 20 thatmay implement the techniques described in this disclosure. Video encoder20 may perform intra and inter coding of video blocks within videoslices. Intra coding relies on spatial prediction to reduce or removespatial redundancy in video within a given video frame or picture. Intercoding relies on temporal prediction to reduce or remove temporalredundancy in video within adjacent frames or pictures of a videosequence. Intra prediction mode (I mode) may refer to any of severalspatial based compression modes.

In the example of FIG. 5, video encoder 20 includes video data memory40, prediction processing unit 41, decoded picture buffer (DPB) 64,summer 50, transform processing unit 52, quantization unit 54, andentropy encoding unit 56. Prediction processing unit 41 includespartition unit 35, motion estimation unit 42, motion compensation unit44, intra BC unit 48, and intra prediction processing unit 46. For videoblock reconstruction, video encoder 20 also includes inversequantization unit 58, inverse transform processing unit 60, and summer62. An in-loop filter (not pictured) may be positioned between summer 62and DPB 64.

In various examples, a fixed or programmable hardware unit of videoencoder 20 may be tasked to perform the techniques of this disclosure.Also, in some examples, the techniques of this disclosure may be dividedamong one or more of the illustrated fixed or programmable hardwareunits of video encoder 20 shown in FIG. 5, though other devices may alsoperform the techniques of this disclosure.

Video data memory 40 may store video data to be encoded by thecomponents of video encoder 20. The video data stored in video datamemory 40 may be obtained, for example, from video source 18. DPB 64 isa buffer that stores reference video data for use in encoding video databy video encoder 20 (e.g., in intra or inter coding modes, also referredto as intra or inter prediction coding modes). Video data memory 40 andDPB 64 may be formed by any of a variety of memory devices, such asdynamic random access memory (DRAM), including synchronous DRAM (SDRAM),magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types ofmemory devices. Video data memory 40 and DPB 64 may be provided by thesame memory device or separate memory devices. In various examples,video data memory 40 may be on-chip with other components of videoencoder 20, or off-chip relative to those components.

As shown in FIG. 5, video encoder 20 receives video data, and partitionunit 35 partitions the data into video blocks. This partitioning mayalso include partitioning into slices, tiles, or other larger units, aswells as video block partitioning, e.g., according to a quadtreestructure of LCUs and CUs. Video encoder 20 generally illustrates thecomponents that encode video blocks within a video slice to be encoded.The slice may be divided into multiple video blocks (and possibly intosets of video blocks referred to as tiles). Prediction processing unit41 may select one of a plurality of possible coding modes, such as oneof a plurality of intra coding modes or one of a plurality of intercoding modes, for the current video block based on error results (e.g.,coding rate and the level of distortion). Prediction processing unit 41may provide the resulting intra or inter coded block to summer 50 togenerate residual block data and to summer 62 to reconstruct the encodedblock for use as a reference picture.

Intra prediction processing unit 46 within prediction processing unit 41may perform intra predictive coding of the current video block relativeto one or more neighboring blocks in the same frame or slice as thecurrent block to be coded to provide spatial compression. Motionestimation unit 42 and motion compensation unit 44 within predictionprocessing unit 41 perform inter predictive coding of the current videoblock relative to one or more predictive blocks in one or more referencepictures to provide temporal compression.

Motion estimation unit 42 may be configured to determine the interprediction mode for a video slice according to a predetermined patternfor a video sequence. The predetermined pattern may designate videoslices in the sequence as P slices or B slices. Motion estimation unit42 and motion compensation unit 44 may be highly integrated, but areillustrated separately for conceptual purposes. Motion estimation,performed by motion estimation unit 42, is the process of generatingmotion vectors, which estimate motion for video blocks. A motion vector,for example, may indicate the displacement of a PU of a video blockwithin a current video frame or picture relative to a predictive blockwithin a reference picture. Intra BC unit 48 may determine vectors,e.g., block vectors, for Intra BC coding in a manner similar to thedetermination of motion vectors by motion estimation unit 42 for interprediction, or may utilize motion estimation unit 42 to determine theblock vector.

A predictive block is a block that is found to closely match the PU ofthe video block to be coded in terms of pixel difference, which may bedetermined by sum of absolute difference (SAD), sum of square difference(SSD), or other difference metrics. In some examples, video encoder 20may calculate values for sub-integer pixel positions of referencepictures stored in DPB 64. For example, video encoder 20 may interpolatevalues of one-quarter pixel positions, one-eighth pixel positions, orother fractional pixel positions of the reference picture. Therefore,motion estimation unit 42 may perform a motion search relative to thefull pixel positions and fractional pixel positions and output a motionvector with fractional pixel precision.

Motion estimation unit 42 calculates a motion vector for a PU of a videoblock in an inter coded slice by comparing the position of the PU to theposition of a predictive block of a reference picture. The referencepicture may be selected from a first reference picture list (List 0) ora second reference picture list (List 1), each of which identify one ormore reference pictures stored in DPB 64. Motion estimation unit 42sends the calculated motion vector to entropy encoding unit 56 andmotion compensation unit 44.

In some examples, intra BC unit 48 may generate vectors and fetchpredictive blocks in a manner similar to that described above withrespect to motion estimation unit 42 and motion compensation unit 44,but with the predictive blocks being in the same picture or frame as thecurrent block and with the vectors being referred to as block vectors asopposed to motion vectors. In other examples, intra BC unit 48 may usemotion estimation unit 42 and motion compensation unit 44, in whole orin part, to perform such functions for Intra BC prediction according tothe techniques described herein. In either case, for Intra BC, apredictive block may be a block that is found to closely match the blockto be coded, in terms of pixel difference, which may be determined bysum of absolute difference (SAD), sum of squared difference (SSD), orother difference metrics, and identification of the block may includecalculation of values for sub-integer pixel positions.

Motion compensation, performed by motion compensation unit 44, mayinvolve fetching or generating the predictive block based on the motionvector determined by motion estimation, possibly performinginterpolations to sub-pixel precision. Upon receiving the motion vectorfor the PU of the current video block, motion compensation unit 44 maylocate the predictive block to which the motion vector points in one ofthe reference picture lists. Video encoder 20 forms a residual videoblock by subtracting pixel values of the predictive block from the pixelvalues of the current video block being coded, forming pixel differencevalues. The pixel difference values form residual data for the block,and may include both luma and chroma difference components. Summer 50represents the component or components that perform this subtractionoperation. Motion compensation unit 44 may also generate syntax elementsassociated with the video blocks and the video slice for use by videodecoder 30 in decoding the video blocks of the video slice.

Whether the predictive video block is from the same picture according toIntra BC prediction, or a different picture according to interprediction, video encoder 20 may form a residual video block bysubtracting pixel values of the predictive block from the pixel valuesof the current video block being coded, forming pixel difference values.The pixel difference values form residual data for the block, and mayinclude both luma component differences and chroma componentdifferences. Summer 50 represents the component or components thatperform this subtraction operation. Intra BC unit 48 and/or motioncompensation unit 44 may also generate syntax elements associated withthe video blocks and the video slice for use by a video decoder, such asvideo decoder 30, in decoding the video blocks of the video slice. Thesyntax elements may include, for example, syntax elements defining thevector used to identify the predictive block, any flags indicating theprediction mode, or any other syntax described with respect to thetechniques of this disclosure.

Intra prediction processing unit 46 may intra-predict a current block,as an alternative to the inter-prediction performed by motion estimationunit 42 and motion compensation unit 44, or the Intra BC predictionperformed by intra BC unit 48, as described above. In particular, intraprediction processing unit 46 may determine an intra prediction mode,including an Intra BC mode, to use to encode a current block. In someexamples, intra prediction processing unit 46 may encode a current blockusing various intra prediction modes, e.g., during separate encodingpasses, and intra prediction processing unit 46 (or a mode select unit,in some examples) may select an appropriate intra prediction mode to usefrom the tested modes. As part of determining an intra prediction mode,intra prediction processing unit 46 may construct an MPM candidate listaccording to the techniques of this disclosure. Intra predictionprocessing unit may select as the intra prediction mode for a particularblock either an intra prediction mode in the MPM candidate list or anon-most probable mode not in the MPM candidate list.

Intra prediction processing unit 46 may, for example, calculaterate-distortion values using a rate-distortion analysis for the varioustested intra prediction modes, and select the intra prediction modehaving the best rate-distortion characteristics among the tested modes.Rate-distortion analysis generally determines an amount of distortion(or error) between an encoded block and an original, unencoded blockthat was encoded to produce the encoded block, as well as a bit rate(that is, a number of bits) used to produce the encoded block. Intraprediction processing unit 46 may calculate ratios from the distortionsand rates for the various encoded blocks to determine which intraprediction mode exhibits the best rate-distortion value for the block.

In any case, after selecting an intra prediction mode for a block, intraprediction processing unit 46 may provide information indicative of theselected intra prediction mode for the block to entropy encoding unit56. Entropy encoding unit 56 may encode the information indicating theselected intra prediction mode in accordance with the techniques of thisdisclosure. For blocks that are encoded using an intra prediction mode,entropy encoding unit 56 may, for example, select one or more contextsfor encoding the information indicating if the actual intra predictionmode is a mode in the MPM candidate list.

After prediction processing unit 41 generates the predictive block forthe current video block via either inter prediction or intra prediction,video encoder 20 forms a residual video block by subtracting thepredictive block from the current video block. The residual video datain the residual block may be included in one or more TUs and applied totransform processing unit 52. Transform processing unit 52 transformsthe residual video data into residual transform coefficients using atransform, such as a discrete cosine transform (DCT) or a conceptuallysimilar transform. Transform processing unit 52 may convert the residualvideo data from a pixel domain to a transform domain, such as afrequency domain.

Transform processing unit 52 may send the resulting transformcoefficients to quantization unit 54. Quantization unit 54 quantizes thetransform coefficients to further reduce bit rate. The quantizationprocess may reduce the bit depth associated with some or all of thecoefficients. The degree of quantization may be modified by adjusting aquantization parameter. In some examples, quantization unit 54 may thenperform a scan of the matrix including the quantized transformcoefficients. Alternatively, entropy encoding unit 56 may perform thescan.

Following quantization, entropy encoding unit 56 entropy encodes thequantized transform coefficients. For example, entropy encoding unit 56may perform context adaptive variable length coding (CAVLC), contextadaptive binary arithmetic coding (CABAC), syntax-based context-adaptivebinary arithmetic coding (SBAC), probability interval partitioningentropy (PIPE) coding or another entropy encoding methodology ortechnique. Following the entropy encoding by entropy encoding unit 56,the encoded bitstream may be transmitted to video decoder 30, orarchived for later transmission or retrieval by video decoder 30.Entropy encoding unit 56 may also entropy encode the motion vectors andthe other syntax elements for the current video slice being coded.

Inverse quantization unit 58 and inverse transform processing unit 60apply inverse quantization and inverse transformation, respectively, toreconstruct the residual block in the pixel domain for later use as areference block for prediction of other video blocks. Motioncompensation unit 44 and/or intra BC unit 48 may calculate a referenceblock by adding the residual block to a predictive block of one of thereference pictures within one of the reference picture lists. Motioncompensation unit 44 and/or intra BC unit 48 may also apply one or moreinterpolation filters to the reconstructed residual block to calculatesub-integer pixel values for use in motion estimation.

Summer 62 adds the reconstructed residual block to the motioncompensated prediction block produced by motion compensation unit 44 toproduce a reference block for storage in DPB 64. The reference block maybe used by intra BC unit 48, motion estimation unit 42 and motioncompensation unit 44 as a reference block to inter predict a block in asubsequent video frame or picture.

Video encoder 20 represents an example of a device for encoding videodata that is configured to determine a current block of video data iscoded in an intra prediction mode, add an intra prediction mode of afirst neighboring block to an MPM candidate list for the current block,add an intra prediction mode for a second neighboring block to the MPMcandidate list, add an intra prediction mode for a third neighboringblock to the most probable mode list, and generate informationidentifying an actual intra prediction mode used to encode the currentblock of video data. The first neighboring block, the second neighboringblock, and the third neighboring block may each correspond to one of aleft block, an above block, a below-left block, an above right block, oran above-left block.

Video encoder 20 may check a group of neighboring blocks in a fixedorder to determine if neighboring blocks from the group of neighboringblocks were intra coded. Video encoder 20 may add intra prediction modesused to encode neighboring blocks from the group of neighboring blocksinto the MPM candidate list in a fixed order. Video encoder 20 may checkone or more neighboring blocks of a group of neighboring blocks todetermine if the one or more neighboring blocks were intra coded. Amaximum number of neighboring blocks in the group of neighboring blocksmay be less than a maximum number of entries for the MPM candidate list.Video encoder 20 may add intra prediction modes used to encode the oneor more neighboring blocks into the MPM candidate list.

Video encoder 20 may check one or more neighboring blocks of a group ofneighboring blocks to determine if the one or more neighboring blockswere intra coded and, in response to two neighboring blocks from thegroup of neighboring blocks being coded using a same intra predictionmode, include only one instance of the same intra prediction mode in theMPM candidate list. to include only one instance of the same intraprediction mode in the MPM candidate list, video encoder 20 may not adda second instance of the same intra prediction mode to the MPM candidatelist. To include only one instance of the same intra prediction mode inthe MPM candidate list, video encoder 20 may remove an instance of thesame intra prediction mode from the MPM candidate list.

Video encoder 20 may check one or more neighboring blocks of a group ofneighboring blocks to identify intra prediction modes to add to the MPMcandidate list. To check the one or more neighboring blocks of the groupof neighboring blocks to identify intra prediction modes to add to theMPM candidate list, video encoder 20 may determine if the one or moreneighboring blocks were coded using an intra prediction mode. When aneighboring block is coded using an intra prediction mode, video encoder20 may add the intra prediction mode used to encode the neighboringblock to the MPM candidate list.

Video encoder 20 may determine a number of neighboring blocks in thegroup of neighboring blocks based on one or more of a size of thecurrent block, whether the current block is a square block or arectangular block, whether the current block is a horizontal block or avertical block, or a prediction mode used to encode a neighboring blockof the group of neighboring blocks. Video encoder 20 may determinelocations of neighboring blocks in the group of neighboring blocks basedon one or more of a size of the current block size, whether the currentblock is a square block or a rectangular block, whether the currentblock is vertically oriented or horizontally oriented, a size of aneighbor block, whether a neighbor block is a square block or arectangular block, or whether a neighbor block is vertically oriented orhorizontally oriented. Video encoder 20 may determine an order forchecking neighboring blocks in the group of neighboring blocks based onone or more of a size of the current block size, whether the currentblock is a square block or a rectangular block, whether the currentblock is vertically oriented or horizontally oriented, a size of aneighbor block, whether a neighbor block is a square block or arectangular block, or whether a neighbor block is vertically oriented orhorizontally oriented.

The group of neighboring blocks may be the same group of neighboringblocks used for one or both an AMVP mode or a merge mode. To check theone or more neighboring blocks of the group of neighboring blocks toidentify intra prediction modes to add to the MPM candidate list, videoencoder 20 may check the one or more neighboring blocks using a sameorder used to check neighboring blocks for one or both an AMVP mode or amerge mode.

In response to a number of intra prediction modes from the one or moreneighboring blocks added to the MPM candidate list exceeding a thresholdnumber, video encoder 20 may terminate the checking of the one morechecking one or more neighboring blocks of a group of neighboringblocks. The threshold number may be less than a number of neighboringblocks in the group of neighboring blocks. The threshold number may beless than a maximum number of intra prediction modes included in the MPMcandidate list.

Video encoder 20 may add one or more derived intra prediction modes tothe MPM candidate list. Video encoder 20 may determine the one or morederived intra prediction mode based on an intra prediction mode of aneighboring block. To determine the one or more derived intra predictionmodes based on the intra prediction mode of the neighboring block, videoencoder 20 may add an intra prediction mode with a mode index of theintra prediction mode of the neighboring block plus an offset to the MPMcandidate list.

To determine the one or more derived intra prediction mode based on theintra prediction mode of the neighboring block, video encoder 20 may adda first offset to the intra prediction mode of the first neighboringblock to determine a first derived intra prediction mode, add a secondoffset to the intra prediction mode of the first neighboring block todetermine a second derived intra prediction mode, and add the firstderived intra prediction mode and the second derived intra predictionmode to the MPM candidate list. To determine the one or more derivedintra prediction mode based on the intra prediction mode of theneighboring block, video encoder 20 may add a first offset to the intraprediction mode of the first neighboring block to determine a firstderived intra prediction mode, add a second offset to the intraprediction mode of the second neighboring block to determine a secondderived intra prediction mode, and add the first derived intraprediction mode and the second derived intra prediction mode to the MPMcandidate list.

Video encoder 20 may determine the offset based on one or both of acharacteristic of the current block or a characteristic of theneighboring block. To determine the one or more derived intra predictionmode based on the intra prediction mode of the neighboring block, videoencoder 20 may add an intra prediction mode with a mode index 1 greaterthan a mode index of the intra prediction mode of the neighboring blockto the MPM candidate list. To determine the one or more derived intraprediction mode based on the intra prediction mode of the neighboringblock, video encoder 20 may add an intra prediction mode with a modeindex 2 greater than a mode index of the intra prediction mode of theneighboring block to the MPM candidate list. To determine the one ormore derived intra prediction mode based on the intra prediction mode ofthe neighboring block, video encoder 20 may add an intra prediction modewith a mode index 1 less than a mode index of the intra prediction modeof the neighboring block to the MPM candidate list. To determine the oneor more derived intra prediction mode based on the intra prediction modeof the neighboring block, video encoder 20 may add an intra predictionmode with a mode index 2 less than a mode index of the intra predictionmode of the neighboring block to the MPM candidate list.

In response to two derived intra prediction modes being a same intraprediction mode, video encoder 20 may include only one instance of thederived intra prediction mode in the MPM candidate list. To include onlyone instance of the derived intra prediction mode in the MPM candidatelist, video encoder 20 may not add a second instance of the derivedintra prediction mode to the MPM candidate list. To include only oneinstance of the derived intra prediction mode in the MPM candidate list,video encoder 20 may remove an instance of the derived intra predictionmode from the MPM candidate list.

In response to a number of derived intra prediction modes added to theMPM candidate list exceeding a threshold number of derived intraprediction modes, video encoder 20 may terminate the adding of derivedintra prediction modes. The threshold number of derived intra predictionmodes plus a number of neighbor-based intra prediction modes included inthe MPM candidate list may be less than a maximum number of intraprediction modes included in the MPM candidate list.

Video encoder 20 may add one or more default candidates to the MPMcandidate list. Video encoder 20 may add one or more default candidatesto the MPM candidate list in response to a number of availableneighbor-based intra prediction modes and derived intra prediction modesbeing less than a maximum number of intra prediction modes included inthe MPM candidate list. To add the one or more default candidates to theMPM candidate list, video encoder 20 may add one or more defaultcandidates to the MPM candidate list until a number of intra predictionmodes in the MPM candidate list is equal to a maximum number of intraprediction modes included in the MPM candidate list is reached.

Video encoder 20 may add one or more neighbor-based intra predictionmodes to the MPM candidate list and, after adding all of the one or moreneighbor-based intra prediction modes to the MPM candidate list, add oneor more default intra prediction modes to the MPM candidate list. Afteradding all of the one or more neighbor-based intra prediction modes tothe MPM candidate list, video encoder 20 may add one or more defaultintra prediction modes to the MPM candidate list.

Video encoder 20 may add the one or more neighbor-based intra predictionmodes to the MPM candidate list and, after adding all of the one or moreneighbor-based intra prediction modes to the MPM candidate list, addingone or more default intra prediction modes to the MPM candidate list.After adding all of the one or more neighbor-based intra predictionmodes to the MPM candidate list, video encoder 20 may add one or morederived intra prediction modes to the MPM candidate list. After addingall of the one or more neighbor-based intra prediction modes to the MPMcandidate list, video encoder 20 may add one or more default intraprediction modes to the MPM candidate list. After adding the intraprediction mode of the first neighboring block to the MPM candidate listfor the current block, video encoder 20 may add a first derivedcandidate to the MPM candidate list, and after adding the first derivedcandidate to the MPM candidate list, video encoder 20 may add the intraprediction mode for the second neighboring block to the MPM candidatelist.

In some instances, the actual intra prediction mode used to encode thecurrent block of video data may be an intra prediction mode from the MPMcandidate list. In some instances, the actual intra prediction mode usedto encode the current block of video data may be a non-most probablemode.

The information identifying the actual intra prediction mode used toencode the current block of video data may be a context coded indexvalue that identifies one of the intra prediction modes in the MPMcandidate list, and video encoder 20 may encode the context coded indexvalue using any technique described in this disclosure or any othertechnique.

Video encoder 20 also represents an example of a device for encodingvideo data that is configured to check three or more neighboring blocksof a group of neighboring blocks to identify intra prediction modes toadd to an MPM candidate list for a current block and encode the currentblock using an intra prediction mode. Video encoder 20 may check thegroup of neighboring blocks in a fixed order to determine if neighboringblocks from the group of neighboring blocks were intra coded. Videoencoder 20 may add intra prediction modes used to encode neighboringblocks from the group of neighboring blocks to the MPM candidate list ina fixed order. Video encoder 20 may check the three or more neighboringblocks of the group of neighboring blocks to determine if the three ormore neighboring blocks were intra coded and add intra prediction modesused to encode the three or more neighboring blocks into the MPMcandidate list. A maximum number of neighboring blocks in the group ofneighboring blocks is less than a maximum number of entries for the MPMcandidate list.

Video encoder 20 may check the three or more neighboring blocks of thegroup of neighboring blocks to determine if the three or moreneighboring blocks were intra coded, and in response to two neighboringblocks from the group of neighboring blocks being coded using a sameintra prediction mode, include only one instance of the same intraprediction mode in the MPM candidate list. To include only one instanceof the same intra prediction mode in the MPM candidate list, videoencoder 20 may not add a second instance of the same intra predictionmode to the MPM candidate list. To include only one instance of the sameintra prediction mode in the MPM candidate list, video encoder 20 mayremove an instance of the same intra prediction mode from the MPMcandidate list.

To check the three or more neighboring blocks of the group ofneighboring blocks to identify intra prediction modes to add to the MPMcandidate list, video encoder 20 may determine if the three or moreneighboring blocks were coded using an intra prediction mode. When aneighboring block is coded using an intra prediction mode, video encoder20 may add the intra prediction mode used to encode the neighboringblock to the MPM candidate list.

Video encoder 20 may determine a number of neighboring blocks in thegroup of neighboring blocks based on three or more of a size of thecurrent block, whether the current block is a square block or arectangular block, whether the current block is a horizontal block or avertical block, or a prediction mode used to encode a neighboring blockof the group of neighboring blocks. Video encoder 20 may determinelocations of neighboring blocks in the group of neighboring blocks basedon three or more of a size of the current block size, whether thecurrent block is a square block or a rectangular block, whether thecurrent block is vertically oriented or horizontally oriented, a size ofa neighbor block, whether a neighbor block is a square block or arectangular block, or whether a neighbor block is vertically oriented orhorizontally oriented.

Video encoder 20 may determine an order for checking neighboring blocksin the group of neighboring blocks based on one or more of a size of thecurrent block size, whether the current block is a square block or arectangular block, whether the current block is vertically oriented orhorizontally oriented, a size of a neighbor block, whether a neighborblock is a square block or a rectangular block, or whether a neighborblock is vertically oriented or horizontally oriented.

The group of neighboring blocks may correspond to the same group ofneighboring blocks used for one or both an AMVP mode or a merge mode. Tocheck the three or more neighboring blocks of the group of neighboringblocks to identify intra prediction modes to add to the MPM candidatelist, video encoder 20 may check the three or more neighboring blocksusing a same order used to check neighboring blocks for one or both anAMVP mode or a merge mode.

In response to a number of intra prediction modes from the three or moreneighboring blocks added to the MPM candidate list exceeding a thresholdnumber, video encoder 20 may terminate the checking of the one morechecking three or more neighboring blocks of a group of neighboringblocks. The threshold number may be less than a number of neighboringblocks in the group of neighboring blocks. The threshold number may beless than a maximum number of intra prediction modes included in the MPMcandidate list.

Video encoder 20 may add one or more derived intra prediction modes tothe MPM candidate list. Video encoder 20 may determine the three or morederived intra prediction mode based on an intra prediction mode of aneighboring block. To determine the three or more derived intraprediction mode based on the intra prediction mode of the neighboringblock, video encoder 20 may add an intra prediction mode with a modeindex of the intra prediction mode of the neighboring block plus anoffset to the MPM candidate list. Video encoder 20 may determine theoffset based on one or both of a characteristic of the current block ora characteristic of the neighboring block.

To determine the three or more derived intra prediction mode based onthe intra prediction mode of the neighboring block, video encoder 20 mayadd an intra prediction mode with a mode index 1 greater than a modeindex of the intra prediction mode of the neighboring block to the MPMcandidate list. To determine the three or more derived intra predictionmode based on the intra prediction mode of the neighboring block, videoencoder 20 may add an intra prediction mode with a mode index 2 greaterthan a mode index of the intra prediction mode of the neighboring blockto the MPM candidate list. To determine the three or more derived intraprediction mode based on the intra prediction mode of the neighboringblock, video encoder 20 may add an intra prediction mode with a modeindex 1 less than a mode index of the intra prediction mode of theneighboring block to the MPM candidate list. To determine the three ormore derived intra prediction mode based on the intra prediction mode ofthe neighboring block, video encoder 20 may add an intra prediction modewith a mode index 2 less than a mode index of the intra prediction modeof the neighboring block to the MPM candidate list.

In response to two derived intra prediction modes being a same intraprediction mode, video encoder 20 may include only one instance of thederived intra prediction mode in the MPM candidate list. To include onlyone instance of the derived intra prediction mode in the MPM candidatelist, video encoder 20 may not add a second instance of the derivedintra prediction mode to the MPM candidate list. To include only oneinstance of the derived intra prediction mode in the MPM candidate list,video encoder 20 may remove an instance of the derived intra predictionmode from the MPM candidate list.

In response to a number of derived intra prediction modes added to theMPM candidate list exceeding a threshold number of derived intraprediction modes, video encoder 20 may terminate the adding of derivedintra prediction modes. The threshold number of derived intra predictionmodes plus a number of neighbor-based intra prediction modes included inthe MPM candidate list may be less than a maximum number of intraprediction modes included in the MPM candidate list.

Video encoder 20 may add one or more default candidates to the MPMcandidate list. Video encoder 20 may add one or more default candidatesto the MPM candidate list in response to a number of availableneighbor-based intra prediction modes and derived intra prediction modesbeing less than a maximum number of intra prediction modes included inthe MPM candidate list. To add the one or more default candidates to theMPM candidate list, video encoder 20 may add one or more defaultcandidates to the MPM candidate list until a number of intra predictionmodes in the MPM candidate list is equal to a maximum number of intraprediction modes included in the MPM candidate list is reached.

Video encoder 20 may generate information identifying an actual intraprediction mode used to encode the current block of video data. Theactual intra prediction mode used to encode the current block of videodata may be a most probable mode or may be a non-most probable mode. Ifthe actual intra prediction mode is a most probable mode, then theinformation identifying the actual intra prediction mode used to encodethe current block of video data may include a context coded index valuethat identifies one of the intra prediction modes in the MPM candidatelist, and video encoder 20 may encode the context coded index valueusing any technique described in this disclosure or using othertechniques.

Video encoder 20 also represents an example of a device for encodingvideo data that is configured to generate an MPM candidate list for acurrent block, determine an actual intra prediction mode for encodingthe current block, in response to the actual intra prediction mode beingan intra prediction mode included in the most probable list, contextencode an index value identifying the actual intra prediction modeincluded in the MPM candidate list. To context encode the index valueidentifying the actual intra prediction mode included in the MPMcandidate list, video encoder 20 may determine an index value associatedwith the actual intra prediction mode, binarize the index valueassociated with the actual intra prediction mode to determine abinarized codeword, map the binarized index value to bins, and contextencode each bin associated with the binarized codeword.

The binarized codeword may be one of a unary coded codeword, a truncatedunary codeword, a fixed binary codeword, a Golomb coded codeword, anExponential Golomb coded codeword, or a Rice coded codeword. Each bin ofthe binarized codeword may correspond to one of the most probable modesin the MPM candidate list.

Video encoder 20 may determine the context for each bin based on aclassification of the most probable mode corresponding to each bin. Fora first bin corresponding to a first most probable mode, video encoder20 may determine a context for the first bin based on whether the firstmost probable mode is a horizontal mode, whether the first most probablemode is a vertical mode, whether the first most probable mode is adiagonal mode, or whether the first most probable mode is a non-angularmode. The context may be further used for decoding non-intraprediction-related syntax elements. The MPM candidate list for thecurrent block may be determined using any technique described in thisdisclosure or other techniques.

FIG. 6 is a block diagram illustrating an example video decoder 30 thatmay implement the techniques described in this disclosure. In theexample of FIG. 6, video decoder 30 includes video data memory 79,entropy decoding unit 80, prediction processing unit 81, inversequantization unit 86, inverse transform processing unit 88, summer 90,and DPB 92. Prediction processing unit 81 includes intra BC unit 85,motion compensation unit 82 and intra prediction processing unit 84.Video decoder 30 may, in some examples, perform a decoding passgenerally reciprocal to the encoding pass described with respect tovideo encoder 20 from FIG. 5.

In various examples, a unit of video decoder 30 may be tasked to performthe techniques of this disclosure. Also, in some examples, thetechniques of this disclosure may be divided among one or more of theunits of video decoder 30. For example, intra BC unit 85 may perform thetechniques of this disclosure, alone, or in combination with other unitsof video decoder 30, such as motion compensation unit 82, intraprediction processing unit 84, and entropy decoding unit 80. In someexamples, video decoder 30 may not include intra BC unit 85 and thefunctionality of intra BC unit 85 may be performed by other componentsof prediction processing unit 81, such as motion compensation unit 82.

Video data memory 79 may store video data, such as an encoded videobitstream, to be decoded by the components of video decoder 30. Thevideo data stored in video data memory 79 may be obtained, for example,from storage device 32, from a local video source, such as a camera, viawired or wireless network communication of video data, or by accessingphysical data storage media. Video data memory 79 may form a codedpicture buffer (CPB) that stores encoded video data from an encodedvideo bitstream. DPB 92 stores reference video data for use in decodingvideo data by video decoder 30 (e.g., in intra or inter coding modes,also referred to as intra or inter prediction coding modes). Video datamemory 79 and DPB 92 may be formed by any of a variety of memorydevices, such as dynamic random access memory (DRAM), includingsynchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM(RRAM), or other types of memory devices. Video data memory 79 and DPB92 may be provided by the same memory device or separate memory devices.In various examples, video data memory 79 may be on-chip with othercomponents of video decoder 30, or off-chip relative to thosecomponents.

During the decoding process, video decoder 30 receives an encoded videobitstream that represents video blocks of an encoded video slice andassociated syntax elements from video encoder 20. Entropy decoding unit80 of video decoder 30 entropy decodes the bitstream to generatequantized coefficients, motion vectors, and other syntax elements.Entropy decoding unit 80 forwards the motion vectors and other syntaxelements to prediction processing unit 81. Video decoder 30 may receivethe syntax elements at the video slice level and/or the video blocklevel.

When the video slice is coded as an intra coded (I) slice or for intracoded blocks in other types of slices, intra prediction processing unit84 of prediction processing unit 81 may generate prediction data for avideo block of the current video slice based on a signaled intraprediction mode and data from previously decoded blocks of the currentframe or picture. Intra prediction processing unit 84 may be configuredto implement the techniques of this disclosure for performing intraprediction. More specifically, intra prediction processing unit 84 maybe configured to generate an MPM candidate list according to the MPMcandidate list construction techniques described herein. When the videoframe is coded as an inter coded (i.e., B or P) slice, motioncompensation unit 82 of prediction processing unit 81 producespredictive blocks for a video block of the current video slice based onthe motion vectors and other syntax elements received from entropydecoding unit 80. The predictive blocks may be produced from one of thereference pictures within one of the reference picture lists. Videodecoder 30 may construct the reference frame lists, List 0 and List 1,using default construction techniques based on reference pictures storedin DPB 92.

In other examples, when the video block is coded according to the IntraBC mode described herein, intra BC unit 85 of prediction processing unit81 produces predictive blocks for the current video block based on blockvectors and other syntax elements received from entropy decoding unit80. The predictive blocks may be within a reconstructed region withinthe same picture as the current video block defined by video encoder 20,and retrieved from DPB 92.

Motion compensation unit 82 and/or intra BC unit 85 may determineprediction information for a video block of the current video slice byparsing the motion vectors and other syntax elements, and uses theprediction information to produce the predictive blocks for the currentvideo block being decoded. For example, motion compensation unit 82 usessome of the received syntax elements to determine a prediction mode(e.g., intra or inter prediction) used to code the video blocks of thevideo slice, an inter prediction slice type (e.g., B slice or P slice),construction information for one or more of the reference picture listsfor the slice, motion vectors for each inter encoded video block of theslice, inter prediction status for each inter coded video block of theslice, and other information to decode the video blocks in the currentvideo slice.

Similarly, intra BC unit 85 may use some of the received syntaxelements, e.g., a flag, to determine that the current video block waspredicted using the Intra BC mode, construction information indicatingwhich video blocks of the picture are within the reconstructed regionand should be stored in DPB 92, block vectors for each Intra BCpredicted video block of the slice, Intra BC prediction status for eachIntra BC predicted video block of the slice, and other information todecode the video blocks in the current video slice.

Motion compensation unit 82 may also perform interpolation based oninterpolation filters. Motion compensation unit 82 may use interpolationfilters as used by video encoder 20 during encoding of the video blocksto calculate interpolated values for sub-integer pixels of referenceblocks. In this case, motion compensation unit 82 may determine theinterpolation filters used by video encoder 20 from the received syntaxelements and use the interpolation filters to produce predictive blocks.Video decoder 30 may be configured to decode blocks coded in merge modeand/or AMVP mode, in which case prediction processing unit 81 may beconfigured to assemble the same candidate lists assembled by videoencoder 20. For example, prediction processing unit 81 may also performthe techniques described above with respect to FIGS. 6 and 7.

Inverse quantization unit 86 inverse quantizes, i.e., de-quantizes, thequantized transform coefficients provided in the bitstream and decodedby entropy decoding unit 80. The inverse quantization process mayinclude use of a quantization parameter calculated by video encoder 20for each video block in the video slice to determine a degree ofquantization and, likewise, a degree of inverse quantization that shouldbe applied. Inverse transform processing unit 88 applies an inversetransform, e.g., an inverse DCT, an inverse integer transform, or aconceptually similar inverse transform process, to the transformcoefficients in order to produce residual blocks in the pixel domain.

After motion compensation unit 82 or intra BC unit 85 generates thepredictive block for the current video block based on the vectors andother syntax elements, video decoder 30 forms a decoded video block bysumming the residual blocks from inverse transform processing unit 88with the corresponding predictive blocks generated by motioncompensation unit 82 and intra BC unit 85. Summer 90 represents thecomponent or components that perform this summation operation to producereconstructed video blocks.

Summer 90 represents the component or components that perform thissummation operation. An in-loop filter (not pictured) may be positionedbetween summer 90 and DPB 92. The decoded video blocks in a given frameor picture are then stored in DPB 92, which stores reference picturesused for subsequent motion compensation. DPB 92, or a memory deviceseparate from DPB 92, may also store decoded video for laterpresentation on a display device, such as display device 34 of FIG. 1.

Video decoder 30 represents an example of a device for decoding videodata that is configured to determine a current block of video data iscoded in an intra prediction mode; add an intra prediction mode of afirst neighboring block to an MPM candidate list for the current block;add an intra prediction mode for a second neighboring block to the MPMcandidate list; add an intra prediction mode for a third neighboringblock to the most probable mode list; and decode the current block ofvideo data using an intra prediction. The first neighboring block, thesecond neighboring block, and the third neighboring block may eachcorrespond to one of a left block, an above block, a below block, anabove right block, or an above left block.

Video decoder 30 may, for example, be configured to check a group ofneighboring blocks in a fixed order to determine if neighboring blocksfrom the group of neighboring blocks were intra coded. Video decoder 30may add intra prediction modes used to encode neighboring blocks fromthe group of neighboring blocks into the MPM candidate list in a fixedorder. Video decoder 30 may check one or more neighboring blocks of agroup of neighboring blocks to determine if the one or more neighboringblocks were intra coded and add intra prediction modes used to encodethe one or more neighboring blocks into the MPM candidate list. Amaximum number of neighboring blocks in the group of neighboring blocksmay be less than a maximum number of entries for the MPM candidate list.

Video decoder 30 may, for example, check one or more neighboring blocksof a group of neighboring blocks to determine if the one or moreneighboring blocks were intra coded, and in response to two neighboringblocks from the group of neighboring blocks being coded using a sameintra prediction mode, include only one instance of the same intraprediction mode in the MPM candidate list. To include only one instanceof the same intra prediction mode in the MPM candidate list, videodecoder 30 may not add a second instance of the same intra predictionmode to the MPM candidate list, or to include only one instance of thesame intra prediction mode in the MPM candidate list, video decoder 30may remove an instance of the same intra prediction mode from the MPMcandidate list.

Video decoder 30 may check one or more neighboring blocks of a group ofneighboring blocks to identify intra prediction modes to add to the MPMcandidate list. To check the one or more neighboring blocks of the groupof neighboring blocks to identify intra prediction modes to add to theMPM candidate list, video decoder 30 may determine if the one or moreneighboring blocks were coded using an intra prediction mode. When aneighboring block is coded using an intra prediction mode, video decoder30 may add the intra prediction mode used to encode the neighboringblock to the MPM candidate list.

To determine a number of neighboring blocks in the group of neighboringblocks, video decoder 30 may determine the number of neighboring blocksin the group of neighboring blocks based on one or more of a size of thecurrent block, whether the current block is a square block or arectangular block, whether the current block is a horizontal block or avertical block, or a prediction mode used to encode a neighboring blockof the group of neighboring blocks. Video decoder 30 may determinelocations of neighboring blocks in the group of neighboring blocks basedon one or more of a size of the current block size, whether the currentblock is a square block or a rectangular block, whether the currentblock is vertically oriented or horizontally oriented, a size of aneighbor block, whether a neighbor block is a square block or arectangular block, or whether a neighbor block is vertically oriented orhorizontally oriented. Video decoder 30 may determine an order forchecking neighboring blocks in the group of neighboring blocks based onone or more of a size of the current block size, whether the currentblock is a square block or a rectangular block, whether the currentblock is vertically oriented or horizontally oriented, a size of aneighbor block, whether a neighbor block is a square block or arectangular block, or whether a neighbor block is vertically oriented orhorizontally oriented.

The group of neighboring blocks may correspond to the same group ofneighboring blocks used for one or both an AMVP mode or a merge mode. Tocheck the one or more neighboring blocks of the group of neighboringblocks to identify intra prediction modes to add to the MPM candidatelist, video decoder 30 may check the one or more neighboring blocksusing a same order used to check neighboring blocks for one or both anAMVP mode or a merge mode.

In response to a number of intra prediction modes from the one or moreneighboring blocks added to the MPM candidate list exceeding a thresholdnumber, video decoder 30 may terminate the checking of the one morechecking one or more neighboring blocks of a group of neighboringblocks. The threshold number may, for example, be less than a number ofneighboring blocks in the group of neighboring blocks. The thresholdnumber may, for example, be less than a maximum number of intraprediction modes included in the MPM candidate list.

Video decoder 30 may add one or more derived intra prediction modes tothe MPM candidate list. Video decoder 30 may determine the one or morederived intra prediction mode based on an intra prediction mode of aneighboring block. To determine the one or more derived intra predictionmodes based on the intra prediction mode of the neighboring block, videodecoder 30 may add an intra prediction mode with a mode index of theintra prediction mode of the neighboring block plus an offset to the MPMcandidate list. To determine the one or more derived intra predictionmode based on the intra prediction mode of the neighboring block, videodecoder 30 may add a first offset to the intra prediction mode of thefirst neighboring block to determine a first derived intra predictionmode, add a second offset to the intra prediction mode of the firstneighboring block to determine a second derived intra prediction mode,and add the first derived intra prediction mode and the second derivedintra prediction mode to the MPM candidate list. To determine the one ormore derived intra prediction mode based on the intra prediction mode ofthe neighboring block, video decoder 30 may add a first offset to theintra prediction mode of the first neighboring block to determine afirst derived intra prediction mode, add a second offset to the intraprediction mode of the second neighboring block to determine a secondderived intra prediction mode, and add the first derived intraprediction mode and the second derived intra prediction mode to the MPMcandidate list.

Video decoder 30 may determine the offset based on one or both of acharacteristic of the current block or a characteristic of theneighboring block. To determine the one or more derived intra predictionmode based on the intra prediction mode of the neighboring block, videodecoder 30 may add an intra prediction mode with a mode index 1 greaterthan a mode index of the intra prediction mode of the neighboring blockto the MPM candidate list. To determine the one or more derived intraprediction mode based on the intra prediction mode of the neighboringblock, video decoder 30 may add an intra prediction mode with a modeindex 2 greater than a mode index of the intra prediction mode of theneighboring block to the MPM candidate list. To determine the one ormore derived intra prediction mode based on the intra prediction mode ofthe neighboring block, video decoder 30 may add an intra prediction modewith a mode index 1 less than a mode index of the intra prediction modeof the neighboring block to the MPM candidate list. To determine the oneor more derived intra prediction mode based on the intra prediction modeof the neighboring block, video decoder 30 may add an intra predictionmode with a mode index 2 less than a mode index of the intra predictionmode of the neighboring block to the MPM candidate list.

In response to two derived intra prediction modes being a same intraprediction mode, video decoder 30 may include only one instance of thederived intra prediction mode in the MPM candidate list. To include onlyone instance of the derived intra prediction mode in the MPM candidatelist, video decoder 30 may not add a second instance of the derivedintra prediction mode to the MPM candidate list. To include only oneinstance of the derived intra prediction mode in the MPM candidate list,video decoder 30 may remove an instance of the derived intra predictionmode from the MPM candidate list.

In response to a number of derived intra prediction modes added to theMPM candidate list exceeding a threshold number of derived intraprediction modes, video decoder 30 may terminate the adding of derivedintra prediction modes. The threshold number of derived intra predictionmodes plus a number of neighbor-based intra prediction modes included inthe MPM candidate list may be less than a maximum number of intraprediction modes included in the MPM candidate list.

Video decoder 30 may add one or more default candidates to the MPMcandidate list. Video decoder 30 may add one or more default candidatesto the MPM candidate list in response to a number of availableneighbor-based intra prediction modes and derived intra prediction modesbeing less than a maximum number of intra prediction modes included inthe MPM candidate list. To add the one or more default candidates to theMPM candidate list, video decoder 30 may add one or more defaultcandidates to the MPM candidate list until a number of intra predictionmodes in the MPM candidate list is equal to a maximum number of intraprediction modes included in the MPM candidate list is reached.

Video decoder 30 may add one or more neighbor-based intra predictionmodes to the MPM candidate list, and after adding all of the one or moreneighbor-based intra prediction modes to the MPM candidate list, add oneor more default intra prediction modes to the MPM candidate list. Afteradding all of the one or more neighbor-based intra prediction modes tothe MPM candidate list, video decoder 30 may add one or more defaultintra prediction modes to the MPM candidate list.

Video decoder 30 may add the one or more neighbor-based intra predictionmodes to the MPM candidate list, and after adding all of the one or moreneighbor-based intra prediction modes to the MPM candidate list, add oneor more default intra prediction modes to the MPM candidate list. Afteradding all of the one or more neighbor-based intra prediction modes tothe MPM candidate list, video decoder 30 may add one or more derivedintra prediction modes to the MPM candidate list. After adding all ofthe one or more neighbor-based intra prediction modes to the MPMcandidate list, video decoder 30 may add one or more default intraprediction modes to the MPM candidate list.

After adding the intra prediction mode of the first neighboring block tothe MPM candidate list for the current block, video decoder 30 may add afirst derived candidate to the MPM candidate list and, after adding thefirst derived candidate to the MPM candidate list, add the intraprediction mode for the second neighboring block to the MPM candidatelist.

In some instances, to decode the current block of video data using theintra prediction mode, video decoder 30 may use an intra prediction modefrom the MPM candidate list. In other instances, to decode the currentblock of video data using the intra prediction mode, video decoder 30may use an intra prediction mode that is a non-most probable mode. Insome instances, video decoder 30 may receive a context coded index valuethat identifies one of the intra prediction modes in the MPM candidatelist and decode the context coded index value using techniques describedin this disclosure or other techniques.

Video decoder 30 also represents an example of a device for decodingvideo data that is configured to check three or more neighboring blocksof a group of neighboring blocks to identify intra prediction modes toadd to an MPM candidate list for a current block and decode the currentblock using an intra prediction mode. Video decoder 30 may check thegroup of neighboring blocks in a fixed order to determine if neighboringblocks from the group of neighboring blocks were intra coded. Videodecoder 30 may add intra prediction modes used to encode neighboringblocks from the group of neighboring blocks to the MPM candidate list ina fixed order.

Video decoder 30 may check the three or more neighboring blocks of thegroup of neighboring blocks to determine if the three or moreneighboring blocks were intra coded. A maximum number of neighboringblocks in the group of neighboring blocks may be less than a maximumnumber of entries for the MPM candidate list. Video decoder 30 may addintra prediction modes used to encode the three or more neighboringblocks into the MPM candidate list.

Video decoder 30 may check the three or more neighboring blocks of thegroup of neighboring blocks to determine if the three or moreneighboring blocks were intra coded, and in response to two neighboringblocks from the group of neighboring blocks being coded using a sameintra prediction mode, include only one instance of the same intraprediction mode in the MPM candidate list. To include only one instanceof the same intra prediction mode in the MPM candidate list, videodecoder 30 may not add a second instance of the same intra predictionmode to the MPM candidate list. To include only one instance of the sameintra prediction mode in the MPM candidate list, video decoder 30 mayremove an instance of the same intra prediction mode from the MPMcandidate list.

To check the three or more neighboring blocks of the group ofneighboring blocks to identify intra prediction modes to add to the MPMcandidate list, video decoder 30 may determine if the three or moreneighboring blocks were coded using an intra prediction mode. When aneighboring block is coded using an intra prediction mode, video decoder30 may add the intra prediction mode used to encode the neighboringblock to the MPM candidate list.

Video decoder 30 may determine a number of neighboring blocks in thegroup of neighboring blocks based on three or more of a size of thecurrent block, whether the current block is a square block or arectangular block, whether the current block is a horizontal block or avertical block, or a prediction mode used to encode a neighboring blockof the group of neighboring blocks. Video decoder 30 may determinelocations of neighboring blocks in the group of neighboring blocks basedon three or more of a size of the current block size, whether thecurrent block is a square block or a rectangular block, whether thecurrent block is vertically oriented or horizontally oriented, a size ofa neighbor block, whether a neighbor block is a square block or arectangular block, or whether a neighbor block is vertically oriented orhorizontally oriented. Video decoder 30 may determine an order forchecking neighboring blocks in the group of neighboring blocks based onone or more of a size of the current block size, whether the currentblock is a square block or a rectangular block, whether the currentblock is vertically oriented or horizontally oriented, a size of aneighbor block, whether a neighbor block is a square block or arectangular block, or whether a neighbor block is vertically oriented orhorizontally oriented.

The group of neighboring blocks may be the same group of neighboringblocks used for one or both an AMVP mode or a merge mode. To check thethree or more neighboring blocks of the group of neighboring blocks toidentify intra prediction modes to add to the MPM candidate list, videodecoder 30 may check the three or more neighboring blocks using a sameorder used to check neighboring blocks for one or both an AMVP mode or amerge mode.

In response to a number of intra prediction modes from the three or moreneighboring blocks added to the MPM candidate list exceeding a thresholdnumber, video decoder 30 may terminate the checking of the one morechecking three or more neighboring blocks of a group of neighboringblocks. The threshold number may be less than a number of neighboringblocks in the group of neighboring blocks. The threshold number may beless than a maximum number of intra prediction modes included in the MPMcandidate list.

Video decoder 30 may add one or more derived intra prediction modes tothe MPM candidate list. Video decoder 30 may determine the three or morederived intra prediction mode based on an intra prediction mode of aneighboring block. To determine the three or more derived intraprediction mode based on the intra prediction mode of the neighboringblock, video decoder 30 may add an intra prediction mode with a modeindex of the intra prediction mode of the neighboring block plus anoffset to the MPM candidate list. Video decoder 30 may determine theoffset based on one or both of a characteristic of the current block ora characteristic of the neighboring block.

To determine the three or more derived intra prediction mode based onthe intra prediction mode of the neighboring block, video decoder 30 mayadd an intra prediction mode with a mode index 1 greater than a modeindex of the intra prediction mode of the neighboring block to the MPMcandidate list. To determine the three or more derived intra predictionmode based on the intra prediction mode of the neighboring block, videodecoder 30 may add an intra prediction mode with a mode index 2 greaterthan a mode index of the intra prediction mode of the neighboring blockto the MPM candidate list. To determine the three or more derived intraprediction mode based on the intra prediction mode of the neighboringblock, video decoder 30 may add an intra prediction mode with a modeindex 1 less than a mode index of the intra prediction mode of theneighboring block to the MPM candidate list. To determine the three ormore derived intra prediction mode based on the intra prediction mode ofthe neighboring block, video decoder 30 may add an intra prediction modewith a mode index 2 less than a mode index of the intra prediction modeof the neighboring block to the MPM candidate list.

In response to two derived intra prediction modes being a same intraprediction mode, video decoder 30 may include only one instance of thederived intra prediction mode in the MPM candidate list. To include onlyone instance of the derived intra prediction mode in the MPM candidatelist, video decoder 30 may not add a second instance of the derivedintra prediction mode to the MPM candidate list. To include only oneinstance of the derived intra prediction mode in the MPM candidate list,video decoder 30 may remove an instance of the derived intra predictionmode from the MPM candidate list.

In response to a number of derived intra prediction modes added to theMPM candidate list exceeding a threshold number of derived intraprediction modes, video decoder 30 may terminate the adding of derivedintra prediction modes. The threshold number of derived intra predictionmodes plus a number of neighbor-based intra prediction modes included inthe MPM candidate list may be less than a maximum number of intraprediction modes included in the MPM candidate list.

Video decoder 30 may add one or more default candidates to the MPMcandidate list. Video decoder 30 may add one or more default candidatesto the MPM candidate list in response to a number of availableneighbor-based intra prediction modes and derived intra prediction modesbeing less than a maximum number of intra prediction modes included inthe MPM candidate list. To add the one or more default candidates to theMPM candidate list, video decoder 30 may add one or more defaultcandidates to the MPM candidate list until a number of intra predictionmodes in the MPM candidate list is equal to a maximum number of intraprediction modes included in the MPM candidate list is reached.

In some instances, to decode the current block of video data using theintra prediction mode, video decoder 30 may use an intra prediction modethat is a non-most probable mode. In some instances, video decoder 30may receiving a context coded index value that identifies one of theintra prediction modes in the MPM candidate list and decoding thecontext coded index value using any technique described in thisdisclosure or a different technique.

Video decoder 30 also represents an example of a device for decodingvideo data that is configured to generate an MPM candidate list for acurrent block, receive a context coded index value identifying an intraprediction mode included in the MPM candidate list, determine a contextfor decoding the context coded index value, and context decode thecontext coded index value using the determined context to determine theintra prediction mode. The MPM candidate list may be constructed usingany of the techniques described in this disclosure and/or using othertechniques not described in this disclosure. Based on the determinedcontext value, video decoder 30 may map the context coded index value tobins to determine a binarized codeword that includes the index value andcorresponds to an intra prediction mode from the MPM candidate list.

The binarized codeword may be any of a unary coded codeword, a truncatedunary codeword, a fixed binary codeword, a Golomb coded codeword, andExponential Golomb coded codeword, or a Golomb-Rice coded codeword. Eachbin of the binarized codeword may be context coded. Each bin of thebinarized codeword may correspond to one of the most probable modes inthe MPM candidate list.

Video decoder 30 may determine the context for each bin based on aclassification of the most probable mode corresponding to each bin. Fora first bin corresponding to a first most probable mode, video decoder30 may determine a context for the first bin based on whether the firstmost probable mode is a horizontal mode, whether the first most probablemode is a vertical mode, whether the first most probable mode is adiagonal mode, or whether the first most probable mode is a non-angularmode. The context may be further used for decoding non-intraprediction-related syntax elements.

FIGS. 7A and 7B show examples of a CABAC process at a bin n. In example100 of FIG. 7A, at bin n the range at bin 2 includes the RangeMPS andRangeLPS given by the probability of the LPS (p_(σ)) given a certaincontext state (σ). Example 100 shows the update of the range at bin n+1when the value of bin n is equal to the MPS. In this example, the lowstays the same, but the value of the range at bin n+1 is reduced to thevalue of RangeMPS at bin n. Example 102 of FIG. 7B shows the update ofthe range at bin n+1 when the value of bin n is not equal to the MPS(i.e., equal to the LPS). In this example, the low is moved to the lowerrange value of RangeLPS at bin n. In addition, the value of the range atbin n+1 is reduced to the value of RangeLPS at bin n.

In one example of the HEVC video coding process, range is expressed with9 bits and the low with 10 bits. There is a renormalization process tomaintain the range and low values at sufficient precision. Therenormalization occurs whenever the range is less than 256. Therefore,the range is always equal or larger than 256 after renormalization.Depending on the values of range and low, the BAC outputs to thebitstream, a ‘0,’ or a ‘1,’ or updates an internal variable (called BO:bits-outstanding) to keep for future outputs. FIG. 8 shows examples ofBAC output depending on the range. For example, a ‘1’ is output to thebitstream when the range and low are above a certain threshold (e.g.,512). A ‘0’ is output to the bitstream when the range and low are belowa certain threshold (e.g., 512). Nothing is output to the bitstream whenthe range and lower are between certain thresholds. Instead, the BOvalue is incremented and the next bin is encoded.

In the CABAC context model of H.264/AVC and in some examples of HEVC,there are 128 states. There are 64 possible LPS probabilities (denotedby state σ) that can be from 0 to 63. Each MPS can be zero or one. Assuch, the 128 states are 64 state probabilities times the 2 possiblevalues for MPS (0 or 1). Therefore, the state can be indexed with 7bits.

To reduce the computation of deriving LPS ranges (rangeLPS_(σ)), resultsfor all cases are pre-calculated and stored as approximations in alook-up table in H.264/AVC and in some proposals for HEVC. Therefore,the LPS range can be obtained without any multiplication by using asimple table lookup. Avoiding multiplication can be important for somedevices or applications, since this operation may cause significantlatency in many hardware architectures.

A 4-column pre-calculated LPS range table may be used instead of themultiplication. The range is divided into four segments. The segmentindex can be derived by the question (range>>6)&3. In effect, thesegment index is derived by shifting and dropping bits from the actualrange. The following Table 1 shows the possible ranges and theircorresponding indexes.

TABLE 1 Range Index Range 256-319 320-383 384-447 448-511 (rang>>6) & 30 1 2 3

The LPS range table has then 64 entries (one for each probability state)times 4 (one for each range index). Each entry is the Range LPS, thatis, the value of multiplying the range times the LPS probability. Anexample of part of this table is shown in the following Table 2. Table 2depicts probability states 9-12. In one proposal for HEVC, theprobability states may range from 0-63.

TABLE 2 RangeLPS RangeLPS Prob State (σ) Index 0 Index Index 2 Index 3 .. . . . . . . . . . . . . .  9 90 110 130 150 10 85 104 123 142 11 81 99117 135 12 77 94 111 128 . . . . . . . . . . . . . . .

In each segment (i.e., range value), the LPS range of each probabilitystate_(σ) is pre-defined. In other words, the LPS range of a probabilitystate_(σ) is quantized into four values (i.e., one value for each rangeindex). The specific LPS range used at a given point depends on whichsegment the range belongs to. The number of possible LPS ranges used inthe table is a trade-off between the number of table columns (i.e., thenumber of possible LPS range values) and the LPS range precision.Generally speaking, more columns results in smaller quantization errorsof LPS range values, but also increases the need for more memory tostore the table. Fewer columns increases quantization errors, but alsoreduces the memory needed to store the table.

As described above, each LPS probability state has a correspondingprobability. The probability for each state is derived as follows:p _(σ) =αp _(σ-1)where the state σ is from 0 to 63. The constant α represents the amountof probability change between each context state. In one example,α=0.9493, or, more precisely, α=(0.01875/0.5)^(1/63). The probability atstate σ=0 is equal to 0.5 (i.e., p₀=½). That is, at context state 0, theLPS and MPS are equally probable. The probability at each successivestate is derived by multiplying the previous state by α. As such, theprobability of the LPS occurring at context state α=1 is p₀*0.9493(0.5*0.9493=0.47465). As such, as the index of state α increases, theprobability of the LPS occurring goes down.

CABAC is adaptive because the probability states are updated in order tofollow the signal statistics (i.e., the values of previously codedbins). The update process is as follows. For a given probability state,the update depends on the state index and the value of the encodedsymbol identified either as an LPS or an MPS. As a result of theupdating process, a new probability state is derived, which consists ofa potentially modified LPS probability estimate and, if necessary, amodified MPS value.

In the event of a bin value equaling the MPS, a given state index may beincremented by 1. This for all states except when an MPS occurs at stateindex 62, where the LPS probability is already at its minimum (orequivalently, the maximum MPS probability is reached). In this case, thestate index 62 remains fixed until an LPS is seen, or the last bin valueis encoded (state 63 is used for the special case of the last binvalue). When an LPS occurs, the state index is changed by decrementingthe state index by a certain amount, as shown in the equation below.This rule applies in general to each occurrence of a LPS with thefollowing exception. Assuming a LPS has been encoded at the state withindex σ=0, which corresponds to the equi-probable case, the state indexremains fixed, but the MPS value will be toggled such that the value ofthe LPS and MPS will be interchanged. In all other cases, no matterwhich symbol has been encoded, the MPS value will not be altered. Thederivation of the transition rules for the LPS probability is based onthe following relation between a given LPS probability p_(old) and itsupdated counterpart p_(new):

p_(new)=max(αp_(old), p₆₂) if a MPS occurs

p_(new)=(1−α)+αp_(old) if a LPS occurs

With regard to a practical implementation of the probability estimationprocess in CABAC, it is important to note that all transition rules maybe realized by at most two tables each having 63 entries of 6-bitunsigned integer values. In some examples, state transitions may bedetermined with a single table TransIdxLPS, which determines, for agiven state index σ, the new updated state index TransIdxLPS [σ] in casean LPS has been observed. The MPS-driven transitions can be obtained bya simple (saturated) increment of the state index by the fixed value of1, resulting in an updated state index min(σ+1, 62). Table 3 below is anexample of a partial TransIdxLPS table.

TABLE 3 TransIdxLPS Prob State (σ) New State TransIdxLPS [σ] . . . . . . 9 6 10 8 11 8 12 8 . . . . . .

One problem with previous BAC approaches (e.g., the BAC approach used inH.264/AVC), is that the tables RangeLPS and TransIdxLPS are tuned forlow resolution videos, (i.e., common intermediate format (CIF) andquarter-CIF (QCIF) videos). Currently, a large amount of video contentis high definition (HD) and, in some cases, greater than HD. Videocontent that is HD or greater than HD resolution has differentstatistics than the 10-year-old QCIF sequences used to developH.264/AVC.

As such, tables RangeLPS and TransIdxLPS from H.264/AVC may causeadaptation between states in a manner that is too quick. That is, thetransitions between probability states, especially when an LPS occurs,can be too great for the smoother, higher resolution content of lHDvideo. Thus, the probability models used according to conventionaltechniques are not as accurate for HD and extra-HD content. In addition,as HD video content includes a greater range of pixel values, theH.264/AVC tables do not include enough entries to account for the moreextreme values that may be present in HD content.

As such, there is a need for the RangeLPS and TransIdxLPS tables to bemodified to account for the characteristics of this new content. Thisalso implies that BAC should be different in at least two aspects. Onedifference is that BAC processes should use tables that allow for aslower adaptation process. Another difference is that BAC processesshould account for more extreme cases (i.e., skewed probabilities).

The current RangeLPS and TransIdxLPS tables can be modified to achievethese goals by simply including more probability states and ranges.However, this solution incurs a substantial increase in the sizes of thetables. Slower adaptation may be achieved by using a parameter α closerto 1 than the currently used parameter α (e.g., α=0.9493). However,using a larger value of a causes the probabilities to tend to 0 moreslowly, and as such, more states are needed. In addition, to achieveslower adaptation, it may be beneficial if the lowest possibleprobability is much lower than the currently used lowest probability. Assuch, even more states may be needed to reach that very low probabilityvalue.

In view of the foregoing problems, this disclosure proposes techniquesto modify BAC so as to attain slower adaptation and more skewedprobabilities while keeping the table sizes (e.g., the RangeLPS andTransIdxLPS tables) at a practical level. In other words, thisdisclosure describes techniques to achieve slower adaptation and moreextreme probabilities (i.e., probabilities closer to 0 and 1) whileusing relatively small-sized tables.

The techniques described in this disclosure may use more probabilitystates, e.g., more probability states than used in BAC with H.264/AVC orHEVC. In this case, the TransIdxLPS table can obtain slower adaptationand lower probabilities. In one example, the techniques described inthis disclosure may use 128 probability states instead of 64. Thisincreases the table TransIdxLPS by 64 entries (i.e., 128 entries insteadof 64). This increase allows for slower adaptation and lower minimalprobability. As one example, by setting the parameter α=0.9689, thedifferences between contiguous probabilities become smaller.Additionally, the lowest minimum probability goes down to 0.009, whichis around one half of the H.264/AVC case (i.e., 0.01875). Other numbersof states and a values are also possible, though, in general, the numberof states may be increased and the value of a may be closer to 1 thanthe H.264/AVC case of α=0.9493.

Another parameter that might be modified to improve HD or extra-HDcoding is the parameter p₀. The value of p₀ generally indicates themaximum probability for the LPS. The reason to consider this possibilityis that having a lower p₀ means that the minimal probability alsodecreases. The value of p₀ is set to 0.5 in the conventional BACprocess. This disclosure proposes to allow for other values for p₀.Having other values of p₀ lower than 0.5 allows for smoother transitionsat state 0 when the MPS/LPS swap occurs. In one example, p₀ may be equalto 0.493, although many other examples could also be used.

Usually, each probability state has its own entry in the RangeLPS table.The table size may be represented as:# probability states×# quantized range indexeswhich is 64×4=256 bytes in some proposals for HEVC. Since the number ofstates would increase in examples of this disclosure (doubled in theexample above), the RangeLPS table size may be 128×4=512 bytes. To avoidthis increase in the RangeLPS table size, however, this disclosurefurther proposes to map the probability states indexes to a lower size(i.e., a few number of indexes) to index the RangeLPS size. In otherwords, this disclosure proposes to decouple the state transition processfrom the range computation process. This means, in the current example,that there is a map for the states to range computation. In oneparticular example, this disclosure proposes a process by which videoencoder 20 and/or video decoder 30 is configured to map an indexindicating the determined probability state to one of a plurality ofgrouped indexes (e.g., grouped index for a RangeLPS table), wherein atleast one of the grouped indexes represents at least two of theplurality of probability states. As such, the RangeLPS table (or otherBAC tables) may use fewer indexes than there are probability states.

In one example of the disclosure, the probability state number may bedivided by two to generate a new index to use as an entry for theRangeLPS table. In this case, the 128 probability states are reduced to64 entries. Consequently, the RangeLPS table can keep the current sizeas used in H.264/AVC. Therefore, instead of using the probability stateσ to index the entry in the range LPS table, the techniques described inthis disclosure employs (σ>>1), that is, the state σ is divided by twoand rounded to the lower integer for use as a grouped index into theRangeLPS table. The division can be by a larger number if the RangeLPStable is desired to be smaller for a given implementation, or if thenumber of states is larger (e.g., 256 probability states). In thiscontext, each grouped index represents two probability states. In otherexamples of the disclosure, the grouped indexes may represent two ormore probability states.

From an optimal entropy point of view, the grouping of the states forthe RangeLPS table by using the division or right bit-shift operationmay be beneficial, but may not always be the optimal technique. Theoptimal grouping may depend on several factors, including the number ofstates and the parameter c, among others. The most desirable (andpossibly optimal) grouping might not be a straightforward operation likethe bit-shift operation. In general, the grouping can be described witha table, going from the total number of probability states to a reducednumber of probability state (i.e., grouped states). In another example,this disclosure proposes to use this kind of table. This approach wouldenhance performance (compared to the division or right shifting), at thecost of additional memory. As such, this example is a trade-off betweenmemory and performance, favoring better performance over the linearmapping example (i.e., the division or right shifting).

Hence, although a linear mapping of probability states to entries in theRangeLPS table may be used, it may be desirable to provide a nonlinearmapping. For example, the probability states may be mapped according toa logarithmic mapping. A logarithmic mapping may be achieved, in someexamples, using piecewise linear mapping techniques. In general, such amapping may be defined using a table, such as a precomputed mappingtable.

In general, the techniques described in this disclosure may beperformed, in some examples, by a method or device for entropy codingvideo data. The method may include determining a probability state ofsymbols in a binary arithmetic coding process, wherein the probabilitystate comprises one of a plurality of probability states, and mapping anindex indicating the determined probability state to one of a pluralityof grouped indexes, wherein at least one of the grouped indexesrepresents at least two of the plurality of probability states, andwherein each of the grouped indexes points to a range for a lowestprobability symbol in a table.

In some examples, the number of probability states may be greater than64. For example, the number of probability states may be 128. In someexamples, the number of grouped indexes used as an input into theRangeLPS table is 64. In particular, the number of probability statesmay be 128 and the number of grouped indexes used as an input into theRangeLPS table may be 64. A symbol may be coded based on the groupedindexes, e.g., according to a table based on the probability stateindex, or according to a mathematical operation based on the index. Thedetermined probability state maps to one of a plurality of indexesaccording to a table, or according to a mathematical operation. Themapping may be linear or nonlinear. For example, the mapping may beperformed according to a divide-by-two operation. In some examples, themapping may be a logarithmic mapping. In some examples, a piecewiselinear mapping may be used to define a logarithmic mapping. In someexamples, the value p₀ of the maximum probability for the LPS may beless than 0.5.

The techniques described in this disclosure may be performed, forexample, within a video encoder, video decoder, or combined videoencoder-decoder (CODEC). In particular, such techniques may be performedin an entropy encoding unit of a video encoder and/or an entropydecoding unit of a video decoder. The techniques may be performed, forexample, within a CABAC process, which may be configured to supportvideo coding, such as video coding according to aspects of the HEVCstandard Entropy encoding and decoding units may be apply codingprocesses in a reciprocal or inverse manner, e.g., to encode or decodeany of a variety of video data, such as quantized transform coefficientsassociated with residual video data, motion vector information, syntaxelements, and other types of information that may be useful in a videoencoding and/or video decoding process.

FIG. 9 is a block diagram of an example entropy encoding unit 56 thatmay be configured to perform CABAC in accordance with the techniques ofthis disclosure. A syntax element 118 is input into the entropy encodingunit 56. If the syntax element is already a binary-value syntax element(i.e., a syntax element that only has a value of 0 and 1), the step ofbinarization may be skipped. If the syntax element is a non-binaryvalued syntax element (e.g., a syntax element represented by multiplebits, such as transform coefficient levels), the non-binary valuedsyntax element is binarized by binarizer 120. Binarizer 120 performs amapping of the non-binary valued syntax element into a sequence ofbinary decisions. These binary decisions are often called “bins.” Forexample, for transform coefficient levels, the value of the level may bebroken down into successive bins, each bin indicating whether or not theabsolute value of coefficient level is greater than some value. Forexample, bin 0 (sometimes called a significance flag) indicates if theabsolute value of the transform coefficient level is greater than 0 ornot. Bin 1 indicates if the absolute value of the transform coefficientlevel is greater than 1 or not, and so on. A unique mapping may bedeveloped for each non-binary valued syntax element.

Each bin produced by binarizer 120 is fed to the binary arithmeticcoding side of entropy encoding unit 56. That is, for a predeterminedset of non-binary valued syntax elements, each bin type (e.g., bin 0) iscoded before the next bin type (e.g., bin 1). Coding may be performed ineither regular mode or bypass mode. In bypass mode, bypass coding engine126 performs arithmetic coding using a fixed probability model, forexample, using Golomb-Rice or exponential Golomb coding. Bypass mode isgenerally used for more predictable syntax elements.

Coding in regular mode involves performing CABAC. Regular mode CABAC isfor coding bin values where the probability of a value of a bin ispredictable given then values of previously coded bins. The probabilityof a bin being an LPS is determined by context modeler 122. Contextmodeler 122 outputs the bin value and the context model (e.g., theprobability state σ). The context model may be an initial context modelfor a series of bins, or may be determined based on the coded values ofpreviously coded bins. As described above, the context modeler mayupdate the state based on whether or not the previously-coded bin was anMPS or an LPS.

After the context model and probability state σ is determined by contextmodeler 122, regular coding engine 124 performs BAC on the bin value.According to the techniques of this disclosure, regular coding engine124 performs BAC using TransIdxLPS table 130 that includes more than 64probability states σ. In one example, the number of probability statesis 128. TransIdxLPS is used to determine which probability state is usedfor a next bin (bin n+1) when the previous bin (bin n) is an LPS.Regular coding engine 124 may also use a RangeLPS table 128 to determinethe range value for an LPS given a particular probability state σ.However, according to the techniques of this disclosure, rather thanusing all possible probability states σ of the TransIdxLPS table 130,the probability state indexes σ are mapped to grouped indexes for use inthe RangeLPS table. That is, each index into the RangeLPS table 128 mayrepresent two or more of the total number of probability states. Themapping of probability state index σ to grouped indexes may be linear(e.g., by dividing by two), or may be non-linear (e.g., a logarithmicfunction or mapping table).

In other examples of the disclosure, the difference between successiveprobability states may be made smaller by setting the parameter α to begreater than 0.9493. In one example α=0.9689. In another example of thedisclosure, the highest probability (p₀) of an LPS occurring may be setto be lower than 0.5. In one example, p₀ may be equal to 0.493.

In accordance with one or more techniques of this disclosure, as opposedto using the same value of a variable used to update a probability statein a binary arithmetic coding process (e.g., one or more of a windowsize, a scaling factor (α), and a probability updating speed), entropyencoding unit 56 may use different values of the variable for differentcontext models and/or different syntax elements. For instance, entropyencoding unit 56 may determine, for a context model of a plurality ofcontext models, a value of a variable used to update a probability statein a binary arithmetic coding process, and update the probability statebased on the determined value.

Returning to FIG. 4, in some cases, the entropy encoding unit 56 oranother unit of video encoder 20 may be configured to perform othercoding functions, in addition to entropy coding. For example, entropyencoding unit 56 may be configured to determine coded block pattern(CBP) values for CU's and PU's. Also, in some cases, entropy encodingunit 56 may perform run length coding of coefficients. In addition,entropy encoding unit 56, or other processing units, also may code otherdata, such as the values of a quantization matrix.

As discussed above, inverse quantization unit 58 and inverse transformprocessing unit 60 apply inverse quantization and inversetransformation, respectively, to reconstruct the residual block in thepixel domain, e.g., for later use as a reference block. Motioncompensation unit 44 may calculate a reference block by adding theresidual block to a predictive block of one of the frames of DPB 64.Motion compensation unit 44 may also apply one or more interpolationfilters to the reconstructed residual block to calculate sub-integerpixel values for use in motion estimation. Summer 62 adds thereconstructed residual block to the motion compensated prediction blockproduced by motion compensation unit 44 to produce a reconstructed videoblock for storage in DPB 64. The reconstructed video block may be usedby motion estimation unit 42 and motion compensation unit 44 as areference block to inter-code a block in a subsequent video frame.

FIG. 10 is a block diagram of an example entropy decoding unit 80 thatmay be configured to perform CABAC in accordance with the techniques ofthis disclosure. The entropy decoding unit 80 of FIG. 10 performs CABACin an inverse manner as that of entropy encoding unit 56 described inFIG. 5. Coded bits from bitstream 218 are input into entropy decodingunit 80. The coded bits are fed to either context modeler 220 or bypasscoding engine 222 based on whether or not the coded bits were entropycoded using bypass mode or regular mode. If the coded bits were coded inbypass mode, bypass decoding engine will use Golomb-Rice or exponentialGolomb decoding, for example, to retrieve the binary-valued syntaxelements or bins of non-binary syntax elements.

If the coded bits were coded in regular mode, context modeler 220 maydetermine a probability model for the coded bits and regular decodingengine 224 may decode the coded bits to produce bins of non-binaryvalued syntax elements (or the syntax elements themselves ifbinary-valued). After the context model and probability state σ isdetermined by context modeler 220, regular decoding engine 224 performsBAC on the bin value. According to the techniques of this disclosure,regular decoding engine 224 performs BAC using TransIdxLPS table 228that includes more than 64 probability states σ. In one example, thenumber of probability states is 128, although other numbers ofprobability states could be defined, consistent with the techniques ofthis disclosure. TransIdxLPS is used to determine which probabilitystate is used for a next bin (bin n+1) when the previous bin (bin n) isan LPS. Regular decoding engine 224 may also use a RangeLPS table 226 todetermine the range value for an LPS given a particular probabilitystate σ. However, according to the techniques of this disclosure, ratherthan using all possible probability states σ of the TransIdxLPS table228, the probability state indexes σ are mapped to grouped indexes foruse in RangeLPS table 226. That is, each index into RangeLPS table 226may represent two or more of the total number of probability states. Themapping of probability state index σ to grouped indexes may be linear(e.g., by dividing by two), or may be non-linear (e.g., a logarithmicfunction or mapping table).

In other examples of the disclosure, the difference between successiveprobability states may be made smaller by setting the parameter α to begreater than 0.9493. In one example α=0.9689. In another example of thedisclosure, the highest probability (p₀) of an LPS occurring may be setto be lower than 0.5. In one example, p₀ may be equal to 0.493.

After the bins are decoded by regular decoding engine 224, a reversebinarizer 230 may perform a reverse mapping to convert the bins backinto the values of the non-binary valued syntax elements.

FIG. 11 is a flow diagram illustrating techniques for constructing anMPM candidate list according to the techniques of this disclosure. Thetechniques of FIG. 11 may be performed by either video decoder 30 orvideo encoder 20 and will be described with reference to a generic videocoder. After determining a current block of video data is coded using anintra prediction mode, the video coder constructs an MPM candidate listaccording to the techniques of FIG. 11. In the example of FIG. 11, thevideo coder considers two neighboring blocks (302). If the twoneighboring blocks are coded using intra prediction modes, then thevideo coder adds an intra prediction mode of the first neighboring blockto the MPM candidate list for the current block and adds an intraprediction mode for a second neighboring block to the MPM candidatelist. If the first or second neighboring block is not coded using anintra prediction mode, then the neighboring block does not have anassociated intra prediction mode for the video coder to add to the MPMcandidate list. If the two neighboring blocks are coded using the sameintra prediction mode, then the video coder may only add one instance ofthat intra prediction mode to the MPM candidate list.

After considering the intra prediction modes of the first neighboringblock and the second neighboring block, the video coder considers one ormore default candidates (304). The default candidates may, for example,include one or both of a planar mode and a DC mode. If a default mode isalready included in the MPM candidate list, because for example thedefault mode was the intra prediction mode of the first or secondneighboring block, then the video coder may not add another instance ofthat intra prediction mode to the MPM candidate list.

After considering the default intra prediction modes, the video coderconsiders one or more additional neighboring block candidates (306). Ifan additional neighboring block is coded using an intra prediction mode,then the video coder adds that intra prediction mode of the additionalneighboring block to the MPM candidate list for the current block. Ifthe additional neighboring block is not coded using an intra predictionmode, then the associated neighboring block does not have an associatedintra prediction mode for the video coder to add to the MPM candidatelist. If the additional neighboring candidate is coded using an intraprediction mode that is already included in the MPM candidate list, thenthe video coder may not add another instance of that intra predictionmode to the MPM candidate list.

If after considering all of the additional neighboring candidates thenumber of entries in the MPM candidate list is equal to a thresholdnumber, M, (308, yes), then the video coder terminates the MPM candidatelist construction process. If after considering all of the additionalneighboring candidates the number of entries in the MPM candidate listis less than M (308, no), then the video coder considers a derivedcandidate (310). If after considering the derived candidate the numberof entries in the MPM candidate list is equal to a threshold number, M,(312, yes), then the video coder terminates the MPM candidate listconstruction process. If after considering the derived candidate thenumber of entries in the MPM candidate list is less than M (312, no),then the video coder considers another derived candidate (310). Thevideo coder considers derived candidates until the number of entries inthe MPM candidate list is equal to M. In some instances, the video codermay also terminate the MPM candidate list construction process afterconsidering all possible derived candidates, even if the number ofentries in the MPM candidate list is less than M.

The video coder may determine the one or more derived intra predictionmodes based on an intra prediction mode of a neighboring block. Forexample, to determine the one or more derived intra prediction modesbased on the intra prediction mode of the neighboring block, the videocoder may add an intra prediction mode with a mode index of the intraprediction mode of the neighboring block plus an offset to the MPMcandidate list. The offset may, for example, be equal to one of −2, −1,1, 2, or some other value.

When considering the neighbor block candidates, the video coder mayconsider the neighbor block candidates in a fixed order to determine ifneighboring blocks from the group of neighboring blocks were intra codedand add intra prediction modes used to encode neighboring blocks fromthe group of neighboring blocks into the MPM candidate list in a fixedorder. The video coder may, for example, check the one or moreneighboring blocks using a same order used to check neighboring blocksfor a merge mode.

FIG. 12 is a flow diagram illustrating techniques for encoding a blockof video data according to the techniques of this disclosure. Thetechniques of FIG. 12 will be described with respect to video encoder20, although the techniques of FIG. 12 are not limited to any particulartype of video encoder. In the example of FIG. 12, video encoder 20determines a current block of video data is coded using an intraprediction mode (320). Video encoder 20 generates an MPM candidate list(322). Video encoder 20 may, for example, generate the MPM candidatelist using the techniques described with respect to FIG. 11 or any othertechniques described in this disclosure. Video encoder 20 determines aintra prediction mode using the MPM candidate list (324). Video encoder20 encodes the current block of video data using the intra predictionmode (326). The intra prediction mode used to encode the current blockmay be a most probable mode (i.e., a mode included in the MPM candidatelist) or may be a non-most probable mode (i.e., a mode not included inthe MPM candidate list).

FIG. 13 is a flow diagram illustrating techniques for decoding a blockof video data according to the techniques of this disclosure. Thetechniques of FIG. 13 will be described with respect to video decoder30, although the techniques of FIG. 13 are not limited to any particulartype of video decoder. In the example of FIG. 13, video decoder 30determines a current block of video data is coded using an intraprediction mode (330). Video decoder 30 generates an MPM candidate list(332). Video decoder 30 may, for example, generate the MPM candidatelist using the techniques described with respect to FIG. 11 or any othertechniques described in this disclosure. Video decoder 30 determines anintra prediction mode using the MPM candidate list (334). Video decoder30 decodes the current block of video data using an intra predictionmode (336). The intra prediction mode used to decode the current blockmay be a most probable mode (i.e., a mode included in the MPM candidatelist) or may be a non-most probable mode (i.e., a mode not included inthe MPM candidate list).

Video decoder 30 may, for example, determine the intra prediction modeusing the MPM candidate list by determining if the intra prediction modeis one of the modes in the MPM candidate list or if the intra predictionmode is a mode not in the MPM candidate list. In some coding scenarios,to decode the current block of video data using the intra predictionmode, video decoder 30 may, for example, receive an indication that theintra prediction mode is not an intra prediction mode included in theMPM candidate list and receive additional syntax indicating the intraprediction mode. In some coding scenarios, to decode the current blockof video data using the intra prediction mode, video decoder 30 may, forexample, receive a context coded index value identifying an intraprediction mode included in the MPM candidate list, determine a contextfor decoding the context coded index value; and context decode thecontext coded index value using the determined context to determine theintra prediction mode. Based on the determined context value, videodecoder 30 may map the context coded index value to bins to determine abinarized codeword comprising the index value, where the codewordcorresponds to an intra prediction mode from the MPM candidate list. Thebinarized codeword may, for example, be a truncated unary codeword. Insome examples, each bin of the binarized codeword is context coded. Eachbin of the binarized codeword may correspond to one of the most probablemodes in the MPM candidate list.

Video decoder 30 may determine the context for each bin based on aclassification of the most probable mode corresponding to each bin. Asone example, for a first bin corresponding to a first most probablemode, video decoder 30 may determine a context for the first bin basedon whether the first most probable mode is a horizontal mode, whetherthe first most probable mode is a vertical mode, or whether the firstmost probable mode is a non-angular mode.

In one or more examples, the functions described may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored on or transmitted over, as oneor more instructions or code, a computer-readable medium and executed bya hardware-based processing unit. Computer-readable media may includecomputer-readable storage media, which corresponds to a tangible mediumsuch as data storage media, or communication media including any mediumthat facilitates transfer of a computer program from one place toanother, e.g., according to a communication protocol. In this manner,computer-readable media generally may correspond to (1) tangiblecomputer-readable storage media which is non-transitory or (2) acommunication medium such as a signal or carrier wave. Data storagemedia may be any available media that can be accessed by one or morecomputers or one or more processors to retrieve instructions, codeand/or data structures for implementation of the techniques described inthis disclosure. A computer program product may include acomputer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium. It should be understood, however, thatcomputer-readable storage media and data storage media do not includeconnections, carrier waves, signals, or other transient media, but areinstead directed to non-transient, tangible storage media. Disk anddisc, as used herein, includes compact disc (CD), laser disc, opticaldisc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wheredisks usually reproduce data magnetically, while discs reproduce dataoptically with lasers. Combinations of the above should also be includedwithin the scope of computer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablelogic arrays (FPGAs), or other equivalent integrated or discrete logiccircuitry. Accordingly, the term “processor,” as used herein may referto any of the foregoing structure or any other structure suitable forimplementation of the techniques described herein. In addition, in someaspects, the functionality described herein may be provided withindedicated hardware and/or software modules configured for encoding anddecoding, or incorporated in a combined codec. Also, the techniquescould be fully implemented in one or more circuits or logic elements.

The techniques of this disclosure may be implemented in a wide varietyof devices or apparatuses, including a wireless handset, an integratedcircuit (IC) or a set of ICs (e.g., a chip set). Various components,modules, or units are described in this disclosure to emphasizefunctional aspects of devices configured to perform the disclosedtechniques, but do not necessarily require realization by differenthardware units. Rather, as described above, various units may becombined in a codec hardware unit or provided by a collection ofinteroperative hardware units, including one or more processors asdescribed above, in conjunction with suitable software and/or firmware.

Various examples have been described. These and other examples arewithin the scope of the following claims.

What is claimed is:
 1. A method for decoding video data, the methodcomprising: determining that a current block of video data is codedusing an intra prediction mode; adding an intra prediction mode of afirst neighboring block of the current block to a most probable modecandidate list for the current block; adding an intra prediction modefor a second neighboring block of the current block to the most probablemode candidate list for the current block, wherein the intra predictionmode of the first neighboring block of the current block is differentthan the intra prediction mode of the second neighboring block of thecurrent block; adding a first derived intra prediction mode to the mostprobable mode candidate list for the current block, wherein adding thefirst derived intra prediction mode to the most probable mode candidatelist for the current block comprises: determining whether the intraprediction mode of the first neighboring block belongs to a subset ofmodes that includes a planar mode and a DC mode, wherein the subset ofmodes includes fewer than all available intra prediction modes; and inresponse to determining that the intra prediction mode of the firstneighboring block does not belong to the specified set of modes, addinga first offset to a mode index of the first neighboring block to derivethe first derived intra prediction mode; adding a second derived intraprediction mode to the most probable mode candidate list for the currentblock, wherein adding the second derived intra prediction mode to themost probable mode candidate list for the current block comprisesdetermining the second derived intra prediction mode by adding a secondoffset to the mode index of the first neighboring block; determining anintra prediction mode using the most probable mode candidate list; anddecoding the current block of video data using the intra predictionmode.
 2. The method of claim 1, wherein the first neighboring block andthe second neighboring block are selected from a group including a leftneighbor block, an above neighbor block, a below left neighbor block, anabove right neighbor block, or an above left neighbor block relative tothe current block.
 3. The method of claim 1, further comprising: afteradding the intra prediction modes of the first neighboring block and thesecond neighboring block to the most probable mode candidate list,adding one or more default candidates to the most probable modecandidate list.
 4. The method of claim 3, wherein the one or moredefault candidates comprise one or more of the DC mode, a horizontalmode, or a vertical mode.
 5. The method of claim 1, wherein the firstoffset is equal to one of −2, −1, 1, or 2 and the second offset is equalto one of −2, −1, 1, or
 2. 6. The method of claim 5, further comprising:adding a plurality of derived intra prediction modes to the mostprobable mode candidate list, wherein the plurality of derived intraprediction modes includes the first derived intra prediction mode andthe second derived intra prediction mode, and wherein adding theplurality of derived intra prediction modes to the most probable modecandidate list comprises: adding derived intra prediction modesdetermined with offsets of −1 or 1 before adding derived intraprediction modes determined with offsets of −2 or
 2. 7. The method ofclaim 1, further comprising: in response to two derived intra predictionmodes being a same intra prediction mode, including only one instance ofthe two derived intra prediction modes in the most probable modecandidate list.
 8. The method of claim 1, wherein determining the intraprediction mode comprises: receiving an indication that the intraprediction mode is not an intra prediction mode included in the mostprobable mode candidate list; and receiving additional syntax indicatingthe intra prediction mode.
 9. The method of claim 1, further comprising:checking a group of neighboring blocks in a fixed order to determine ifneighboring blocks from the group of neighboring blocks were intracoded, wherein the group of neighboring blocks comprises the firstneighboring block, the second neighboring block, the third neighboringblock, and at least one other neighboring block; and adding intraprediction modes used to encode neighboring blocks from the group ofneighboring blocks into the most probable mode candidate list in thefixed order.
 10. The method of claim 9, further comprising: in responseto two neighboring blocks from the group of neighboring blocks beingcoded using a same intra prediction mode, including only one instance ofthe same intra prediction mode in the most probable mode candidate list.11. The method of claim 9, wherein checking the one or more neighboringblocks of the group of neighboring blocks comprises checking the one ormore neighboring blocks using a same order used to check neighboringblocks for a merge mode.
 12. The method of claim 9, further comprising:in response to adding intra prediction modes used to encode neighboringblocks from the group of neighboring blocks into the most probable modecandidate list causing a number of intra prediction modes in the mostprobable mode candidate list to exceed a threshold number, terminatingthe checking of the one more checking one or more neighboring blocks ofthe group of neighboring blocks.
 13. A device for decoding video data,the device comprising: a memory configured to store the video data; oneor more processors implemented in circuitry and configured to: determinethat a current block of video data is coded using an intra predictionmode; add an intra prediction mode of a first neighboring block of thecurrent block to a most probable mode candidate list for the currentblock; add an intra prediction mode for a second neighboring block ofthe current block to the most probable mode candidate list for thecurrent block, wherein the intra prediction mode of the firstneighboring block of the current block is different than the intraprediction mode of the second neighboring block of the current block;add a first derived intra prediction mode to the most probable modecandidate list for the current block, wherein to add the first derivedintra prediction mode to the most probable mode candidate list for thecurrent block, the one or more processors are further configured to:determine whether the intra prediction mode of the first neighboringblock belongs to a subset of modes that includes a planar mode and a DCmode, wherein the subset of modes includes fewer than all availableintra prediction modes; and in response to determining that the intraprediction mode of the first neighboring block does not belong to thespecified set of modes, add a first offset to a mode index of the firstneighboring block to derive the first derived intra prediction mode; adda second derived intra prediction mode to the most probable modecandidate list for the current block, wherein to add the second derivedintra prediction mode to the most probable mode candidate list for thecurrent block, the one or more processors are further configured todetermine the second derived intra prediction mode by adding a secondoffset to the mode index of the first neighboring block; determine anintra prediction mode using the most probable mode candidate list; anddecode the current block of video data using the intra prediction mode.14. The device of claim 13, wherein the first neighboring block and thesecond neighboring block are selected from a group including a leftneighbor block, an above neighbor block, a below left neighbor block, anabove right neighbor block, or an above left neighbor block relative tothe current block.
 15. The device of claim 13, wherein the one or moreprocessors are further configured to: after adding the intra predictionmodes of the first neighboring block and the second neighboring block tothe most probable mode candidate list, add one or more defaultcandidates to the most probable mode candidate list.
 16. The device ofclaim 15, wherein the one or more defaults comprise one or more of theDC mode, a horizontal mode, or a vertical mode.
 17. The device of claim13, wherein the first offset is equal to one of −2, −1, 1, or 2 and thesecond offset is equal to one of −2, −1, 1, or
 2. 18. The device ofclaim 17, wherein the one or more processors are further configured to:add a plurality of derived intra prediction modes to the most probablemode candidate list, wherein the plurality of derived intra predictionmodes includes the first derived intra prediction mode and the secondderived intra prediction mode, and wherein adding the plurality ofderived intra prediction modes to the most probable mode candidate listcomprises: add derived intra prediction modes determined with offsets of−1 or 1 before adding derived intra prediction modes determined withoffsets of −2 or
 2. 19. The device of claim 13, wherein the one or moreprocessors are further configured to: in response to two derived intraprediction modes being a same intra prediction mode, include only oneinstance of the two derived intra prediction modes in the most probablemode candidate list.
 20. The device of claim 13, wherein to determinethe intra prediction mode, the one or more processors are furtherconfigured to: receive an indication that the intra prediction mode isnot an intra prediction mode included in the most probable modecandidate list; and receive additional syntax indicating the intraprediction mode.
 21. The device of claim 13, wherein the one or moreprocessors are further configured to: check a group of neighboringblocks in a fixed order to determine if neighboring blocks from thegroup of neighboring blocks were intra coded, wherein the group ofneighboring blocks comprises the first neighboring block, the secondneighboring block, the third neighboring block, and at least one otherneighboring block; and add intra prediction modes used to encodeneighboring blocks from the group of neighboring blocks into the mostprobable mode candidate list in the fixed order.
 22. The device of claim21, wherein the one or more processors are further configured to: inresponse to two neighboring blocks from the group of neighboring blocksbeing coded using a same intra prediction mode, include only oneinstance of the same intra prediction mode in the most probable modecandidate list.
 23. The device of claim 21, wherein to check the one ormore neighboring blocks of the group of neighboring blocks, the one ormore processors are further configured to check the one or moreneighboring blocks using a same order used to check neighboring blocksfor a merge mode.
 24. The device of claim 21, wherein the one or moreprocessors are further configured to: in response to adding intraprediction modes used to encode neighboring blocks from the group ofneighboring blocks into the most probable mode candidate list causing anumber of intra prediction modes in the most probable mode candidatelist to exceed a threshold number, terminate the checking of the onemore checking one or more neighboring blocks of the group of neighboringblocks.
 25. A computer-readable storage medium storing instructions thatwhen executed by one or more processors cause the one or more processorto: determine that a current block of video data is coded using an intraprediction mode; add an intra prediction mode of a first neighboringblock of the current block to a most probable mode candidate list forthe current block; add an intra prediction mode for a second neighboringblock of the current block to the most probable mode candidate list forthe current block, wherein the intra prediction mode of the firstneighboring block of the current block is different than the intraprediction mode of the second neighboring block of the current block;add a first derived intra prediction mode to the most probable modecandidate list for the current block, wherein to add the first derivedintra prediction mode to the most probable mode candidate list for thecurrent block, the instructions cause the one or more processors to:determine whether the intra prediction mode of the first neighboringblock belongs to a subset of modes that includes a planar mode and a DCmode, wherein the subset of modes includes fewer than all availableintra prediction modes; and in response to determining that the intraprediction mode of the first neighboring block does not belong to thespecified set of modes, add a first offset to a mode index of the firstneighboring block to derive the first derived intra prediction mode; adda second derived intra prediction mode to the most probable modecandidate list for the current block, wherein to add the second derivedintra prediction mode to the most probable mode candidate list for thecurrent block, the one or more processors are further configured todetermine the second derived intra prediction mode by adding a secondoffset to the mode index of the first neighboring block; determine anintra prediction mode using the most probable mode candidate list; anddecode the current block of video data using the intra prediction mode.